Live data from Hacker News

Chrome Inspector Detector

adamschwartz.co

91–92 of 92 posts

Re: Chrome Inspector Detector

#92

Earlier quoted context omitted.

Not only that, you have to save a reference to the parts of the console that you want to use just in case they attempt to destroy those. var c = console var l = console.log var log = function(){ l.apply(c, arguments) } Now they can't break the console from working with stuff like: console.log = function(){}

well in that case i guess you could always do var _console = console; console = undefined;

You may break something by breaking it yourself, like naive code: if (window.chrome) console.log("dev forgot to delete this"))
Post reply on HN