THIS IS A STATIC MIRROR OF USERSCRIPTS.ORG - LOGINS DO NOT WORK
Large

Youtube - Better Watch Page

By Takato Last update May 15, 2014 — Installed 151,672 times.

Fixed more/less info in right-side description!!

in
Subscribe to Fixed more/less info in right-side description!! 10 posts, 4 voices



rexydallas Scriptwright
FirefoxWindows

I just wanted to let you know... That I have fixed the more/less info in the right-side description, and I have it working in my copy of the script right now! :D
All I had to do was add some things back in, change some things to jquery in the stuff I added back, add a class refrence, and add the CSS for the show more/less info... And it worked! :D

It was actually quite easy to fix, by the way. Images showing the working show more/less info: http://imgur.com/cTymVMu,gYM57Sf

It will not show in an image, but I have made the links have an href of a hashtag (#) (which will lead you to the top of the page), and added "return false;" to both functions. (which will prevent the link to the top of the page from being followed on left click)

 
mustangfan1995 Scriptwright
FirefoxWindows

why don't you upload your version of this script here, you seem to be pretty good with this stuff and now the the BWP license is changed your allowed to upload your own version.

 
kryptonify User
ChromeWindows

Yea.. can you please upload it and link it here. i want to try it!

 
rexydallas Scriptwright
FirefoxWindows

But I feel posting an entire new script for something which consists of adding back in and fixing for jquery a small feature like this is a little excessive...?

 
mustangfan1995 Scriptwright
FirefoxWindows

well you could continue to develop this script.

 
Mainline421 Scriptwright
FirefoxWindows

@rexydallas To which I agree (only becuase of the license) but you could just post the source in this topic. In all honestly I'm starting to think al rexydallas does is edit images.

 
rexydallas Scriptwright
FirefoxWindows

But then you people complained earlier when I did that because it was 'too complicated'... LOL

I will post it... But be warned, It is not for the average user... Since most people do not know how to javascript, and you need to know at least basic javascript to do this. :o
so only follow this if you know javascript.

Put this in the functions section (after where it says FUNCTIONS):
function descShowMore() {
    debug("descShowMore");
    DescPanel.removeClass("short");
    DescPanel.addClass("long");
    debug("descShowMore done");
    return false;
}
function descShowLess() {
    debug("descShowLess");
    DescPanel.removeClass("long");
    DescPanel.addClass("short");
    debug("descShowLess done");
    return false;
}
function descCheckStatus() {
	status = document.getElementById("watch-description").getAttribute("class");
	if (status.indexOf("yt-uix-expander-collapsed") > -1) {
		descShowLess();
	} else {
		descShowMore();
	}
}
Put this in the space above where it says 'move subscription button to the right side description':
//event listeners
DescPanel = $("#watch-channel-vids-div");
debug("Show more/less event listeners");
$(".show-more").on("click", descShowMore);
$(".show-less").on("click", descShowLess);
replace this:
"			<div id='watch-video-details-toggle-more'>" +
//"				(<a class='hLink show-less'>less info</a>)" +
"			</div>" +
with this:
"			<div id='watch-video-details-toggle-less'>" +
"				(<a class='hLink show-more' href='#'>more info</a>)" +
"			</div>" +
"			<div id='watch-video-details-toggle-more'>" +
"				(<a class='hLink show-less' href='#'>less info</a>)" +
"			</div>" +
add this in the space above 'remove watch7 description bits':
// Make a 200 character short description
debug("Make 200 character short description");
vidDescShort = vidDesc;
vidDescShortN = document.createElement("div");
vidDescShortN.innerHTML = vidDescShort;
while (vidDescShortN.innerHTML.indexOf("<br>") > -1) { // Replace breaks with space
	vidDescShortN.innerHTML = vidDescShortN.innerHTML.replace("<br>", " ");
}
debug("200: Replace links with 'remove' version");
while (vidDescShortN.getElementsByTagName("a").length > 0) { // Replace links with <remove> versions
	thisLink = vidDescShortN.getElementsByTagName("a")[0];
	thisLinkText = document.createElement("remove");
	thisLinkText.innerHTML = thisLink.innerHTML;
	vidDescShortN.replaceChild(thisLinkText, thisLink);
}
debug("200: Remove 'remove' tags");
while (vidDescShortN.innerHTML.indexOf("</remove><remove>") > -1) { // Remove <remove> tags (but keep the inside text)
	vidDescShortN.innerHTML = vidDescShortN.innerHTML.replace("<remove>", "");
}
while (vidDescShortN.innerHTML.indexOf("</remove>") > -1) {
	vidDescShortN.innerHTML = vidDescShortN.innerHTML.replace("</remove>", "");
}
vidDescShort = vidDescShortN.innerHTML;
debug("200: Cut to 197 characters plus '...'");
if (vidDescShort.length > 200) { // Cut to 197 characters plus "..." if length is over 200 characters
	vidDescShort = vidDescShort.substring(0, 197) + "...";
}
debug("Short description done");
</remove>
Make a blank user style, and put this in it:
@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("youtube.com") {



#watch-channel-vids-div.short #watch-video-details-inner-more, #watch-channel-vids-div.short #watch-video-details-toggle-more {
    display:none !important;
}

#watch-channel-vids-div.long #watch-video-details-inner-less, #watch-channel-vids-div.long #watch-video-details-toggle-less {
    display:none !important;
}

#watch-video-details-inner-less {
    margin-top: 4px !important;
    position: static !important;
    padding: 0px 6px 4px !important;
    overflow: hidden !important;
}

.show-more, .show-less {
    text-decoration: none !important;
    border-bottom: 1px dotted #03C!important;
    color: #03C!important;
    cursor: pointer!important;
}



    
}
Told you... not for normal users. It is for advanced users... Hence the part in the code that says "Everything below this line shouldn't be edited unless you are an advanced user and know what you are doing.". Like I said before, you need to know at least basic javascript.

By the way, it is not a walk in the park to insert the code in my message like this... I have to replace a bunch of stuff. >.< I did this as proof that I did in fact fix it. (that is, if you are an "advanced user". LOL!)

By the way, I put it in a user style because it is a pain to insert it into the script, so I decided that I would only insert CSS into an actual script if it is something I will be publishing, or something akin to that...
 
mustangfan1995 Scriptwright
FirefoxWindows

now what about player 3?

 
rexydallas Scriptwright
FirefoxWindows

uhm... I posted about Player 3 in an earlier post, pointing out how to get it. I also have my own script derived from his player replacer code that I use to get it back. Plus I also made annotations work in Player 3, as well. ;P

 
mustangfan1995 Scriptwright
FirefoxWindows

could you upload the player 3 script you made to this site?