Thursday 2 August 2012

This is for mobile users (especially opera mini users)


Here I present some bookmarklets collected from different sources. The bookmarklets are basically javascript codes. So they will work on almost any browser that supoorts javascript. As Opera Mini also supports javascript to some extent, they can also work on Opera Mini. These codes can be typed in the browser url box to execute their functions. You also can save them as bookmarks or Opera Mini speed dials for quick access in Opera Mini.




Page source


javascript:(function(){w=window.innerWidth-15+'px';c=unescape(document.documentElement.innerHTML);c=c.replace(/(<\/[^>]+>)/g,'$1\r\n').replace(/</g,'<').replace(/>/g,'>');document.write('<html><head><style%20type="text\/css">pre{width:'+w+';word-wrap:break-word;}<\/style><title>Page%20Source<\/title><\/head><body>
'+c+'<\/pre><\/body><\/html>');document.close();})();




Translate page into English


javascript:(function(){e=(document.charset||document.characterSet);location.href='
;http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&hl=en&langpair=auto|en&tbb=1&ie='+e;})();




Link list


javascript:(function(){w=window.innerWidth-15+'px';c='<html><head><style%20type="text\/css">div{width:'+w+';word-wrap:break-word;}<\/style><title>Link%20List<\/title><\/head><body><div>';for(i=0;x=document.links;i++)c+='<a%20href="'+x.href+'">'+x.href+'<\/a><br\/>';document.write(c+'<\/div><\/body><\/html>');document.close();})();




Page info


javascript:(function(){w=window.innerWidth-15+'px';d=window.document;c='Title:%20'+d.title+'<br\/>URL:%20'+d.URL+'<br\/>Last%20Modified:%20'+d.lastModified+'<br\/><br\/>Cookies:<br\/>'+document.cookie.replace(/;/g,'<br\/>');document.write('<html><head><style%20type="text\/css">div{width:'+w+';word-wrap:break-word;}<\/style><title>Page%20Info<\/title><\/head><body><div>'+c+'<\/div><\/body><\/html>');document.close();})();




Image list


javascript:(function(){w=window.innerWidth-15+'px';c='<html><head><style%20type="text\/css">div,img{max-width:'+w+';height:auto;word-wrap:break-word;}<\/style><title>Image%20List<\/title><\/head><body><div>';for(j=0;x=document.images[j];j++)c+='<img%20src="'+x.src+'"/><br\/><a href="'+x.src+'">'+x.src+'<\/a><br\/><br\/>';document.write(c+'<\/div><\/body><\/html>');document.close();})();




Character map


javascript:(function(){w=window.innerWidth-15+'px';c='<html><head><style%20type="text\/css">pre{width:'+w+';}li{display:block;width:4.5em;height:2em;float:left;}<\/style><title>Character Map<\/title><\/head><body>
<ul>';l
=[0x21,0x2f,0x3a,0x40,0x7b,0x7e,0xa0,0xbf,0x2022,0x2022,0x2026,0x2026];for(k=0;k<l.length;k+=2)for(j=l[k];j<=l[k+1];j++)c+='<li>'+j+':&#'+j+'<\/li>';document.write(c+'<\/ul><\/pre><\/body><\/html>');document.close();})();




Show Cookies for current site


javascript:if%28document.cookie.length%3C1%29%7Balert%28%27No%20cookie%20for%20this%20site.%27%29%7Delse%7Balert%28%27Cookie%20for%20this%20site:%27+document.cookie%29%7D




Delete Cookies


javascript:%28function%28%29%7BC=document.cookie.split%28%22;%20%22%29;for%28d=%22.%22+location.host;d;d=%28%22%22+d%29.substr%281%29.match%28/%5C..*$/%29%29for%28sl=0;sl%3C2;++sl%29for%28p=%22/%22+location.pathname;p;p=p.substring%280,p.lastIndexOf%28%27/%27%29%29%29for%28i%20in%20C%29if%28c=C%29%7Bdocument.cookie=c+%22;%20domain=%22+d.slice%28sl%29+%22;%20path=%22+p.slice%281%29+%22/%22+%22;%20expires=%22+new%20Date%28%28new%20Date%29.getTime%28%29-1e11%29.toGMTString%28%29%7D%7D%29%28%29




Replace links with their URLs


javascript:%28function%28%29%7Bvar%20i,c,x,h;for%28i=0;x=document.links;++i%29%7Bh=x.href;x.title+=%27%20%27+x.innerHTML;while%28c=x.firstChild%29x.removeChild%28c%29;x.appendChild%28document.createTextNode%28h%29%29;%7D%7D%29%28%29




Replace plain text URLs with clickable links


javascript:-1,-1,%28function%28v%29%7Bwith%28document.body%29%7BinnerHTML=innerHTML.replace%28/%28%5Cw+%29%28:%5C/%5C/%5B%5Cw-.%21%7E*%27;%5C/?:@&=+%24,%#%5D+%29%28?=%5B%5E%3E%5D*%28%3C%7C%24%29%29/g,function%28s,t,u%29%7Breturn%28s.link%28v%5Bt%5D?v%5Bt%5D+u:s%29%29%7D%29%7D%7D%29%28%7B%27ttp%27:%27http%27,%27tp%27:%27http%27,%27ttps%27:%27https%27,%27tps%27:%27https%27%7D%29




Add to Google Reader


javascript:l=document.getElementsByTagName%28%27link%27%29;for%28n=0;n%3Cl.length;n++%29%7Bif%28l%5Bn%5D.getAttribute%28%27rel%27%29==%27alternate%27%29%7Blocation.href=%27http://google.com/reader/m/view/feed/%27+l%5Bn%5D.getAttribute%28%27href%27%29+%27?hl=en%27%7D%7D




Add to Google bookmarks


javascript:%28function%28%29%7Bvar%20a=window,b=document,c=encodeURIComponent,d=a.open%28%22http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=%22+c%28b.location%29+%22&title=%22+c%28b.title%29,%22bkmk_popup%22,%22left=%22+%28%28a.screenX%7C%7Ca.screenLeft%29+10%29+%22,top=%22+%28%28a.screenY%7C%7Ca.screenTop%29+10%29+%22,height=420px,width=550px,resizable=1,alwaysRaised=1%22%29;a.setTimeout%28function%28%29%7Bd.focus%28%29%7D,300%29%7D%29%28%29;




Save to del.icio.us


javascript:location.href=%27http://del.icio.us/post?v=4;url=%27+encodeURIComponent%28location.href%29+%27;title=%27+encodeURIComponent%28document.title%29

No comments:

Post a Comment