-
-
Save tfluehr/189213 to your computer and use it in GitHub Desktop.
Blinky Bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){function anc(e){var p='parentNode';e=$(e);var es=[];while(e=es[property])if(e.nodeType==1)es.push(e);return es;}function visible(el){el=$(el);if(!el){return false;}var a=anc(el);var c=a.length;var v=true;for(var i=0;i<c;i++){if(a[i].style.display=='none'||a[i].style.visibility=='hidden'){v=false;break;}}return v;}(function blinky(){var tmp=document.body.getElementsByTagName('*');tags=[];for(var j=0;j<tmp.length;j++)tags.push(tmp[j]);var fr=[];var ind=[];var l=tags.length;while(l--)var n=tags[l].tagName.toLowerCase();if(n=='iframe'||n=='script'||n=='link'){if(tags[l].tagName.toLowerCase()=='iframe')fr.push(tags[l]);tags[l]=null;ind.push(l);}while(ind.length)Array.splice.call(tags,ind.shift(),1);while(fr.length){try{tmp=fr.shift().contentWindow.document.body.getElementsByTagName('*');var tmp2=[];for(var j=0;j<tmp.length;j++)tmp2.push(tmp[j]);tags=Array.concat.apply(tags,tmp2);}catch(e){}}l=tags.length;if(typeof(lastTag)=='undefined')lastTag=null;if(lastTag)lastTag.style.visibility='';lastTag=null;while(!lastTag){lastTag=tags[Math.floor(Math.random()*l)];if(lastTag.style.visibility=='hidden')lastTag=null;}lastTag.style.visibility='hidden';setTimeout(blinky,1000*Math.random());})();})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment