Created
November 7, 2009 02:45
-
-
Save antimatter15/228499 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//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