Skip to content

Instantly share code, notes, and snippets.

@antimatter15
Created November 7, 2009 02:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save antimatter15/228499 to your computer and use it in GitHub Desktop.
Save antimatter15/228499 to your computer and use it in GitHub Desktop.
//worlds first bookmarklet to pause Google Wave searches.
(function(){
if(!window.elitist){
for(var i in window){
if(window[i]=="display") break;
}
for(var k in window){
if(typeof window[k] == "function"){
var iidx = window[k].toString().indexOf(".style["+i+"]");
if(iidx != -1){
if(window[k].toString().indexOf(".style["+i+"]",iidx) != -1){
if(window[k].length ==4){
if(window[k].toString().indexOf(".innerHTML") != -1) break;
}
}
}
}
}
window.elitist = k;
window.magical = window[k];
}
if(window.searchplay){
window.searchplay = null;
window[elitist] = magical; //elitists are magical
alert("Wave Search has been Resumed.")
}else{
window.searchplay = true;
window[elitist] = function(){} //no op function
alert("Wave Search has been Paused. Run bookmarklet again to Resume.")
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment