Skip to content

Instantly share code, notes, and snippets.

@Couto
Created March 6, 2014 18:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Couto/9395745 to your computer and use it in GitHub Desktop.
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)
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