Chrome Inspector Detector
adamschwartz.co
adamschwartz.co
Just the other day I said to my coworker everybody, by now, knew how to use firebug/inspector (he disagreed and, being in support, he does see more suffering than I do) - we were looking at a client site that had a javascript obfuscation of the html source.
It's like this grand battle stage of the worlds tiniest violins.
img.onclick="javascript:function(){alert('Don\'t steal!');return false}" console.profile = console.profileEnd = function () {}; 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(){} var _console = console;
console = undefined;I actually read the Rails articles quite a bit just because I like to not limit what I do or know to a small subset, even if I do not actively use it. Software does not come to other platforms unless one ports it, after all :)
Disclaimer: not a RoR developer, but I do use Python.
I do understand the lack of support for Opera, with it having just a tiny market share in the US, but it still is a form of exclusion.
I'm glad Opera is switching to Webkit & V8 because besides the many websites breaking I found Opera to be much nicer to use than Chrome or Firefox.
I have all the large browsers installed though for web development, so I can always open something else if needed. I just can't move away from Opera, because of all the native power features I would have to give up or find extensions that may or may not work exactly the same and have future support by their developers. I can say though that unlike some sites I frequented in the past (such as slashdot), I have never had anyone on HN make snarky remarks about me being an Opera user, which is refreshing and quite the opposite of being excluded.
I do think Webkit will help Opera in the long run as well, as long as they do not use it as a reason to throw away their long term commitment they have stuck with to keep backwards support for features and user interface elements. If they ditch most of that on the notion they can just tell users to use Chrome extensions, I would be truly sadden and have little reason to use Opera anymore. I'd probably end up forking Chromium in attempt to make it function like Opera once did and hope other former Opera users would help contribute via code commits along the way. That's just worst case thinking and I'm going to stay optimistic for now :)
Not to get too off track though from the discussion, but the OP (above my original reply) is correct in that there is quite a bit of RoR and Apple upvoted articles (if that was his point), but there are many others in a variety of topics. Perhaps not everyone is as interested as I am about broadening my knowledge of various technologies whether I use them or not, but I think many of us on HN are. Since I don't follow RoR or Apple news that much, I don't mind seeing it, because it at least keeps me exposed to information I don't follow actively on my own.
Now you know how to press it.
Your next problem is that much Linux software (Chrome included) insists on using the MS Windows convention of overloading Control for menu shortcuts. This is a great nuisance when you want to be able to use, for example, both Control-V (the conventional LNEXT character in *nix consoles) and GUI-V (the conventional Paste shortcut in GUIs).
Pre-Linux X programs tended to get this right, since they were not focussed on slavishly imitating MS Windows. Apple got it right somewhat accidentally — the original Mac keyboard had no Control key at all, and it got added to support familiar editing and remote terminal uses.
I'll continue to improve and update https://github.com/adamschwartz/chrome-inspector-detector/is... with the issues reported here. Thanks.
javascript:clearTimeout(setTimeout(function(){}, 1) - 1); chrome.inspector.detector=function(){return{}};you simply used chrome api :)
Profile 'Profile 13' started. chrome.inspector-detector.js:16
Profile 'Profile 13' finished. chrome.inspector-detector.js:17
Console was clearedEDIT: Oh, I get it, it must be housekeeping to clear the log messages generated by the profiler.
delete window.chrome.inspector
Did I win? console.profile = console.clear = function(){}
That's all you need write in the console to stop this annoyance. chrome.inspector.detector = function(){ return {open:false}}
But a more aggresive solution is this one: console = undefined;
var iframe = document.body.appendChild(document.createElement("iframe"));
iframe.style.display = "none";
window._console = iframe.contentWindow.console
And you can use `_console` instead of `console`Perhaps you're making a game and want to pause it or show wireframes when toggling the inspector.
Or perhaps you're a designer and you want to show a grid layout whenever you're inspecting elements.
[edit] https://code.google.com/p/chromium/issues/detail?id=223418