My favorites | Sign in
Logo
             
Search
for
Updated Aug 30, 2009 by aavindraa
Labels: Release
v113  

1.1.3

Reworked big mode

Change tooltip to reflect new behavior:

	bigMode : new Array("Big mode", true, "Have a nice monitor? Like seeing things big? Turn this on. Ensures proper aspect ratio, and maximum viewing in the comfort of your browser."),

First load preview image, then script runs:

var prev = new Image();
prev.src = "http://img.youtube.com/vi/"+unsafeWindow.pageVideoId+"/1.jpg";
prev.addEventListener("load", script, false);

Add fitBig function:

function fitBig() {
	// detect aspect ratio
	var isWide = unsafeWindow.isHDAvailable || (prev.width < 130);
	// run initial fixes
	fitToWindow();
	// fix Aspect Ratio (-25 for player controller bar)
	var w = Math.round((player.offsetHeight - 25) * (isWide ? 1.77 : 1.33));
	if (w > player.parentNode.offsetWidth) {
		w = player.parentNode.offsetWidth;
		player.style.height = (Math.round(w / (isWide ? 1.77 : 1.33))+25) + "px";
	}
	player.style.width = w + "px";
	// center the player fix
	player.style.marginLeft = Math.round(player.parentNode.offsetWidth / 2 - player.offsetWidth/2) + "px";
}

On certain videos, (!opts.useHD && isHDAvailable) causes problems with server

Remove:

swfArgs.fmt_map = "35/640000" + swfArgs.fmt_map.substring(10);

Add:

	swfArgs.fmt_map = unescape(swfArgs.fmt_map).replace(/^22[^,]+,/,"");

Snap Back feature is broken

Due to YouTube update. Remove:

var isBig = fmt == 2;

Add:

var isBig = fmt == "large";

Shade doesn't cover entire page

Remove:

shade.style.height = document.body.offsetHeight + "px";

Add:

shade.style.height = (window.innerHeight + window.scrollMaxY) + "px";

Misc

Permanent CSS padding removal, as it just seems a piece of shit in general:

.watch-wide-mode, #watch-this-vid, #watch-player-div {padding-left:0px!important}\

A few other lines of code added for new big mode feature support.


Sign in to add a comment
Hosted by Google Code