0

Well guys,

I am new with javascript, and i have a problem. Exist a script in Javascript that can do virtually what the f12 key does? Just open the console without pressing the f12 key.

  • Why would you want that? Sounds quite annoying if every website could fire up the devtools. – Bergi Aug 05 '13 at 16:52

1 Answers1

0

With pure JavaScript, running in the brwoser itself, this is not possible.

If you want to do it with an extension, yes it can be done:

This is the documentation for Chrome: https://developer.chrome.com/extensions/devguide.html This is the FireFox add-on guide: https://developer.mozilla.org/en-US/docs/Firefox_addons_developer_guide

Kenneth
  • 28,294
  • 6
  • 61
  • 84
  • The answers to [this question](http://stackoverflow.com/questions/6801577/can-i-programmatically-open-the-devtools-from-a-google-chrome-extension) claim that it's not possible to open the console in Chrome even from an extension. Do you know if that has changed, and can you point to a specific part in the dev guides that mention it? – JJJ Aug 05 '13 at 17:03
  • Well Kenneth i need to do this on IE. Is there a solution in this case? – user2653913 Aug 05 '13 at 17:05
  • I'm not sure about that, you'd have to check the IE documentation. I thought you wanted to do it from a pure JavaScript web page. – Kenneth Aug 05 '13 at 17:06