Created
March 6, 2014 18:04
-
-
Save Couto/9395745 to your computer and use it in GitHub Desktop.
Little bookmarklet to restore the console on those websites that disable it (netflix)
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
javascript:(function () { | |
var iframe = document.createElement("iframe"), | |
console; | |
iframe.src = "about:blank"; | |
iframe.style.display = "none"; | |
document.body.appendChild(iframe); | |
console = (iframe.contentWindow || iframe.contentDocument).console; | |
iframe.parentNode.removeChild(iframe); | |
Object.defineProperty(window, "console", { | |
get: function () { | |
return console; | |
} | |
}); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment