YousableTubeFix

By Mindeye Last update Feb 2, 2012 — Installed 594,860 times.

Requesting Additions to the Script.

in
Subscribe to Requesting Additions to the Script. 4 posts, 2 voices



Chrono Defyi... User
Please add "body {overflow-x: hidden}" to end of CSS styles section.
It removes the horizontal scrollbar when a overflow occurs on the body.
The horizontal scrollbar is never required when using youtube so it can safely be removed.
I requested this before however it seems to have gone unnoticed due to the topic it was in.

Could you also please add an option to ignore aspect ratio in the videos. For example (From the resizeVideo function):
		case "max":

			// Fills the viewport dimensions completely, preserving the aspect ratio

			// Calculates the resize factor (factorR) as the smallest of the vertical and horizontal ratios
			// This is valid if the original video size is smaller than the viewport (at least in one dimension)
			var factorR = Math.min(vh / oPlayerData.height, vw / oPlayerData.width);

			// Multiplies the original dimensions by the factorR factor, rounded down (the rounding mustn't return a bigger number)
			// The aspect ratio is preserved
			newW = Math.floor(oPlayerData.width * factorR);
			newH = Math.floor(oPlayerData.height * factorR);
			break;
would become
		case "max":
                        if(preserveAspectRatio)
                        {
			// Fills the viewport dimensions completely, preserving the aspect ratio

			// Calculates the resize factor (factorR) as the smallest of the vertical and horizontal ratios
			// This is valid if the original video size is smaller than the viewport (at least in one dimension)
			var factorR = Math.min(vh / oPlayerData.height, vw / oPlayerData.width);

			// Multiplies the original dimensions by the factorR factor, rounded down (the rounding mustn't return a bigger number)
			// The aspect ratio is preserved
			newW = Math.floor(oPlayerData.width * factorR);
			newH = Math.floor(oPlayerData.height * factorR);
                        }
                        else
                        { // aspect ratio is ignored
			    newW = vw;
			    newH = vh; 
                        }
			break;
Plus code for the aspect ratio option etcetera

Also the script update doesn't work properly, every time I click HIde (which should hide it for the session), it asks me again for the next video. This is due to the unnecessary else block in the script check.
else {
	// If a new version was previously detected the notice will be shown to the user
	// This is to prevent that the notice will only be shown once a day (when an update check is scheduled)
	if (scriptLastRemoteVersion > scriptVersion) {
		scriptShowUpdateMessage(true, scriptLastRemoteVersion);
	}
}
Please remove the above code to fix it OR fix it some other way.

Also please add the code in my post here: http://userscripts.org/topics/22027#post-body-9...

Much obliged & thank you, if these things are implemented then I can stop having to manually update the script every time there is an update.
 
Chrono Defyi... User

BUMP

 
Mindeye Script's Author

Please, don't bump threads, specially if it was posted only a few days before. It's rude and it won't get my attention faster. Besides I had already read your post, but after I few tests I discover a subtle bug in a support function of the script that I need to fix first.

I'll answer you when I resolve the issue. Be patient!

 
Mindeye Script's Author

Ok, some answers:
- Adding "overflow-x: hidden" to the page is excessive just to remove a horizontal scrollbar that only appears when the video is resized to 1x size or similar. Moreover, a horizontal scrollbar is useful if the player is resized to a bigger size than the viewport or if the desktop horizontal resolution is less than the YouTube basediv width.
Anyway, I have made a code change to solve the root cause of this problem, try the next version to see if it works for you.
- I'll add another resize size (different from max) than just fills the viewport completely
- That else block isn't unnecessary, you can read its purpose in the comments. Besides, as you can see in the code, the scriptShowUpdateMessage function checks sessionStorage to see if the user have chosen to hide the notice for the session, so it won't be shown if that's the case.
- I'll add code to remove the ads on the video (ad_module, etc...) and an option to remove the iTunes section, but I haven't see that "watch-infringe-div" id. Can you give me a link?

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel