This ushers in a new era of annoying and pointless "This website prevents right clicks" popups.
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.
Well ... people who know how to use the inspector also know how to get the content without using the inspector. Although it would be significantly more annoying.
“⌘” is the key that the USB HID spec calls “GUI”. It is the same key as (for instance) “Meta” on Sun keyboards and the Windows logo on MS keyboards.
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 think you're confusing popularity with exclusion. Doesn't bother me or make me feel like an outsider because I use Opera as my primary browser and mostly Linux/Windows PCs. It's all a frame of mind and such statements are not really needed on HN because it's really not true.
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.
One of the main reasons I switched away from Opera was because so many neat little projects made with new HTML5 technologies would not work in Opera. This goes both for small side projects as well as business ventures.
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.
Yeah, I'm kind of used to Opera not always working with everything that it does not phase me anymore after 10 years of use. If it's something I need to see Opera won't render, I either hack around it in Opera or just open Chromium. I also understand that Chrome is popular and many of the projects on hn are hacks put together for the developer and to show us what they do for fun and learning versus projects made for the masses, so I give leadway when things don't always work. Sometimes it's just a simple mistake and the developer is glad to fix it (like he did here [updated in the linked article] for anyone that did not have an Apple keyboard). Although we all have our favorites, most of us like to be accommodating if it does not require hours of additional personal time.
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.
I was using chrome for many years, almost from the start. But switched to firefox a week ago, because my chrome started to feel more and more laggy, both on home and work computer. I'm not disappointed yet.
It may not be clear, but the main use case for this app is not to harm someone, but to aid in development.
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.
Or perhaps you want to make it so that when someone tries to inspect a DOM element, the element turns into a youtube video of Rick Astley singing "Never Gonna Give You Up." --Just sayin...
That may have been your aim and while there is a great potential good, there's also a great potential for evil. You've opened pandora's box and now we'll see how it plays out. My guess is that we're going to see a lot of misguided website abuse this until the Chrome team has to patch it so websites can't know its state.
Could be an intriguing way to detect other developers visiting the site and communicate with them. Last time I checked, the front page of https://vimeo.com was using the inspector console as a recruiting tool.
It's a nice demo and congratulation to Adam but I wonder if I m the only one that doesn't like that the browser allows this detection. I mean accessing the log is one thing but shouldn't this be this unreachable fro; the sandbox?
But what if he starts using setInterval? A more global solution is to: Open the "sources" panel, click on "Event Listener Breakpoints", then click "set Timer" and just delete the lines where it is calling the detector function.
I've made the docked/undocked an experimental feature since it was causing the issues you were seeing. Please let me know if you're still seeing any issues with false positives for open.
From quickly checking the code before the reports, you seemed to be first checking for the height thing, and prematurely returning, before running any profiling. Wouldn't you avoid these problems if you first checked for the surer stuff, and then checked the height?
@goldfeld absolutely. However, the profiler check mucks up the console output so I was hoping to use it as a fallback. For now I've made it experimental and will keep it that way until we can resolve the issues you pointed out. (https://github.com/adamschwartz/chrome-inspector-detector/is...)
Good idea. You should package this as a Chrome extension then. No reason why I should run your code in my app, even in debug mode, when it can run outside and sandboxed.
I've made the docked/undocked an experimental feature since it was causing the issues you were seeing. Please let me know if you're still seeing any issues with false positives for open.
It would be nice to have DOM events (just like onResize), which would only be activated when activating the related option in the console (just like the "Show XHR requests" option).
It kind of gets in the way of development though when the profiler window gets clogged up with the probes... maybe the detector could clean up after itself?
We agree. We're actively looking into other ways to do the detection. For example, when the inspector is docked, we might not need to run the profiler check. We'll continue to update as we find better solutions.
It doesn't matter what your intentions are; eventually it will be used to annoy some developers, lets just hope that it doesn't become something common.
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.