0.99.2Fixed options dialog to run on top of the video. Removed jittery jumping around in various parts of the script. Many minor fixes to let the options dialog run on top of the video. Added "Get Link" feature$("watch-actions-area").childNodes[1].insertBefore(
create("div", { className : "watch-tab" }, new Array(
create("a", {
onclick : function(E) {
E.preventDefault();
var time = "";
if(confirm("Do you want to include the current time in the link?")) {
time = player.getCurrentTime(), m = Math.floor( time / 60), s = Math.round(time - m * 60);
time = "#t=";
if(m > 0)
time += m + "m";
if(s > 0)
time += s + "s";
}
prompt("Here is your custom made link for highest quality:", "http://www.youtube.com/watch" + location.search.replace(/&fmt=\d*/,"") + "&fmt=" + (unsafeWindow.isHDAvailable ? "22" : "18") + time);
},
textContent : "Get Link",
href : "#"
})
)),
$("watch-tab-flag")
);Added click to toggle pause / playplayerCont.addEventListener("click", function(e) {
var x = player.offsetWidth - e.layerX;
var y = player.offsetHeight - e.layerY;
if ((x >= 100 && x <= 125 && y >= 25 && y <= 90) || y <= 25) return;
togglePlay();
}, false);Added an option to collapse all the "collapsables" on YouTube?if(opts.collapse) {
var panels = document.evaluate("//div[contains(@class,'expanded')]", document, null, 6, null), panel, i=panels.snapshotLength;
while(panel=panels.snapshotItem(--i))
panel.className=panel.className.replace("expanded", "");
}
|