Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to activate the Tab from the Javascript Console below?

I'm using Chrome's javascript console (If you're using Chrome or Chromium, you can just press Ctrl + Shift + J now to open it) below the current opened tab.

Is there something I can enter into the console so that the document in the tab above gets the focus and the console looses the focus?

I tried with

chrome.tabs

but it only gives

undefined
like image 610
hakre Avatar asked Dec 20 '12 15:12

hakre


2 Answers

The only way to gain focus without closing the console would be to call either alert();, confirm(); or prompt();.
Alternatively by closing the console (window.open("javascript:close()","_self");) , the main tab can gain focus.

like image 37
Thomas Hickman Avatar answered Oct 21 '22 22:10

Thomas Hickman


https://support.google.com/chrome/bin/answer.py?hl=en&answer=157179

says

(F6 ) Or (Shift + F6)

but you'll have to switch through bunch of things before you reach the main webcontent.

like image 63
ShaggyInjun Avatar answered Oct 22 '22 00:10

ShaggyInjun