Tuesday, October 27, 2009

YouTube Subscriptions fix bookmarklet

UPDATE: Apparently the problem is no longer relevant.
Some time ago YouTube changed the links on http://www.youtube.com/my_subscriptions so that they would open in the same window even if you click it with the third button/wheel. As much as I tolerate other YouTube changes since Google acquired it, this is beyond me. Thus here is my modified version of the AdBlock+ bookmarklet that reverts the links to the way they were.

Drag and drop one of these links to your bookmark toolbar:

YTSF 0.2 - Chrome version (tested in Chrome 3.0.195.38)
YTSF 0.2 - Firefox version (tested in Firefox 3.5.3)

The code:

javascript:(
function(){
function R(w){
try{
var d=w.document,i,T,N,r=1,s;
T=d.getElementsByTagName("a");
for(i=T.length-1;(i+1)&&(N=T[i]);--i)
if(N.className=="title" || N.className=="video-thumb-120 no-quicklist"){
N.href=N.onclick.toString().slice(42,62);
N.onclick='';
}
}
catch(E){r=0}
return r
}
R(self);
}
)()

The original AdBlock+ code can be found here or here.


No comments:

Post a Comment