User:Zigger/Bookmarklets

w:en:Bookmarklet

Control direction (RTL/LTR)

edit

Inputs

edit

Toggle

edit

javascript:(function(){h=document.getElementsByTagName('html')[0].dir.toUpperCase();t=document.getElementsByTagName('textarea');for(i=0;i<t.length;i++){d=t[i].dir.toUpperCase();d=(d=='')?h:d;t[i].dir=(d=='RTL')?'ltr':'rtl'}u=document.getElementsByTagName('input');for(j=0;j<u.length;j++){if(u[j].type.toUpperCase()=='TEXT'){d=u[j].dir.toUpperCase();d=(d=='')?h:d;u[j].dir=(d=='RTL')?'ltr':'rtl'}}})()

Force

edit

javascript:var t=document.getElementsByTagName('textarea');for(i=0;i<t.length;i++){void(t[i].dir='ltr');}var u=document.getElementsByTagName('input');for(i=0;i<u.length;i++){if(u[i].type.toUpperCase()=='TEXT'){void(u[i].dir='ltr')}}

javascript:var t=document.getElementsByTagName('textarea');for(i=0;i<t.length;i++){void(t[i].dir='rtl');}var u=document.getElementsByTagName('input');for(i=0;i<u.length;i++){if(u[i].type.toUpperCase()=='TEXT'){void(u[i].dir='rtl')}}

Toggle top div (mediawiki sites only)

edit

javascript:var g=document.getElementById('globalWrapper');void(g.dir=(g.dir.toUpperCase()=='')?((document.getElementsByTagName('html')[0].dir.toUpperCase()=='RTL')?'ltr':'rtl'):'')

MediaZilla

edit

List similar open bugs

edit

(Credit: [1]) javascript:void(document.location.href='http://bugzilla.wikimedia.org/buglist.cgi?query_format=specific&product='+encodeURIComponent(document.getElementById('product').value)+'&content='+encodeURIComponent(document.getElementsByName('short_desc').item(0).value)+'&bug_status=__open__')