Created
March 26, 2013 14:03
-
-
Save stucox/5245589 to your computer and use it in GitHub Desktop.
Blacks out / reveals the window. Useful as a bookmark (it toggles) — copy the minified version and stick `javascript:` in front of it.
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
(function () { | |
var cover = document.getElementById('__cover'); | |
if(cover) { | |
document.body.removeChild(cover); | |
} | |
else { | |
cover = document.createElement('div'); | |
cover.id = '__cover'; | |
cover.setAttribute('style', 'background:#000;position:fixed;top:0;left:0;width:100%;height:100%;z-index:999999'); | |
document.body.appendChild(cover); | |
} | |
}()); |
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
(function(){var e=document.getElementById("__cover");if(e){document.body.removeChild(e)}else{e=document.createElement("div");e.id="__cover";e.setAttribute("style","background:#000;position:fixed;top:0;left:0;width:100%;height:100%;z-index:999999");document.body.appendChild(e)}})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment