4 ms·
console.profile = console.clear = function(){} That's all you need write in the console to stop this annoyance.
by jQueryIsAwesome 14y ago
console.profile = console.clear = function(){}
That's all you need write in the console to stop this annoyance.
- afschwartz 14y agoDoes that make profiling unusable?
- jQueryIsAwesome 14y agoIt does, but you usually don't want to profile other dev's pages; here is another solution that doesn't make profiling unusable: 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`
- afschwartz 14y agoIt 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.
- jQueryIsAwesome 14y agoIt 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.
- arcatek 14y agoIt 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). [edit] https://code.google.com/p/chromium/issues/detail?id=223418 https://code.google.com/p/chromium/issues/detail?id=223418
- afschwartz 14y agoStarred. Thanks for the submission. Would definitely be better to have this integrated into the browser.
- thirtyseven 14y agoIt 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?
- afschwartz 14y agoWe 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.