Skip navigation.

Posts tagged with "bookmarklet"

"Disable/Enable external CSS" bookmarklet

This bookmarklet toggle the status of the usage about external CSS.
If you invoke this bookmarklet for the first time on some web page, CSS will be disabled.
So, you will (probably) see simple view of the page.
And if you invoke this bookmarklet for the second time, CSS will be enabled.
At this time you can see the same view of the page with which you saw at first time you opened the page.

javascript:(function(){var L=document.getElementsByTagName("link");for(var i=0;i<L.length;i++){if(L[i].rel.toLowerCase()=="stylesheet"){if(L[i].disabled==false){L[i].disabled=true;}else if(L[i].disabled==true){L[i].disabled=false;}}}})();


For more detailed descriptions please see the following page.(Sorry, Japanese only)
http://d.hatena.ne.jp/borbis/20050915

"iFrame/Frame to link list" bookmarklets

These bookmarklets make lists of iFrames/Frames in current page.
By clicking the link you can see the iFrame/Frame on a whole window.
This function is useful for narrow and small screen devices.

1. iFrame/Frame to link list
javascript:(function(){var d=document,f,g,n=0,s="",t=["frame","iframe"],u;for(u in t)for(f=d.getElementsByTagName(t[u]),g=0;g<f.length;g++,n++)s+="<a href=\""+f[g].src+"\">"+n+"."+t[u]+"="+f[g].name+"</a><BR>";n?d.write(s):alert("NoIFrame!")})()

2. Frame to link list
javascript:(function(){if(top.length<1){alert("NoFrame!")}else{var i,s=""; for(i=0;i<top.length;i++){s+="<a href="+frames[i].location.href+">"+i+"."+frames[i].document.title+"</a><BR>";}; document.write (s);}})();


For more detailed descriptions please see following pages.(Sorry, Japanese only)
http://d.hatena.ne.jp/borbis/20040514/p4
http://d.hatena.ne.jp/borbis/20040514/p5

"Reload every" bookmarklets

These bookmarklets are similar to Opera browser's "Reload every" function.

1. For "Opera 8.5 for Windows Mobile".
javascript:(function(){var T=prompt('Reload every(seconds)','60');if(T&&!isNaN(T)){var F='<html><frameset rows="*,0"><frame src="'+location+'"><frame></frameset></html>';var W=open();with(W.document){write(F);close();}var H='<html><script>function R(){parent.frames[0].location="'+location+'";}setInterval("R()",'+T*1000+');</script></html>';with(W.frames[1].document){write(H);close();}}})();


2. For "Opera 7.0 AH-K3001V(Kyocera)"
javascript:(function(){var T=prompt('R-time?','60');if(T&&!isNaN(T)){location='file://localhost/C:/data/areload.html?'+T;}})();

where, contents of the local file "C:/data/areload.html" are
<html>
<script>
document.write('<frameset>');
document.write('<frame name="areload" src="'+document.referrer+'">');
document.write('</frameset>');
setTimeout('R()',location.search.substring(1)*1000);
function R(){location.reload();}
</script>
</html>

.

For more detailed descriptions please see the following pages.(Sorry, Japanese only)
http://d.hatena.ne.jp/borbis/20060122
http://d.hatena.ne.jp/borbis/20040514/p1