My favorites | Sign in
Logo
             
Search
for
Updated Jul 03, 2009 by aavindraa
Labels: Release
0991  

0.99.1

Introduce cinema feature

It runs on every page, and turns itself on automatically if you so wish.

if(!unsafeWindow.toggleLights) {
	if(opts.autoCinema)
		document.body.className += " watch-lights-off";
	$("baseDiv").appendChild(create("div", {id : "watch-longform-shade", style : {height : "100%", display : opts.autoCinema ? "" : "none"}}));
	var head=$("watch-vid-title"), block=create("div", {
			id : "light-switch",
			className : "master-sprite " + (opts.autoCinema ? "dark" : "light"),
			onclick : function() {
				if (document.body.className.indexOf("watch-lights-off") > -1) {
					this.className=this.className.replace("dark", "light");
					$("watch-longform-shade").style.display = "none";
					document.body.className = document.body.className.replace("watch-lights-off", "");
				} else {
					this.className=this.className.replace("light", "dark");
					$("watch-longform-shade").style.display = "inline";
					document.body.className += " watch-lights-off";
				}
			}
	});
	head.insertBefore(block, head.firstChild);
}

Move options into labels, so you can click on the descriptions too

var s=document.createElement("label");

Sign in to add a comment
Hosted by Google Code