Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chrome/firefox- how to run a javascript command

I am using a gwt based ui design framework (called GXT). In the docs for this framework, it is mentioned that running "javascript:isc.showConsole()" when the app is running, will open the developer console in browser.

However when I run this in Chrome it instead does a google search for the command- in firefox it simply does not work.

How do I execute this javascript in firefox or chrome--

javascript:isc.showConsole()
like image 270
Arvind Avatar asked Mar 13 '12 15:03

Arvind


2 Answers

Bookmarklets cannot be executed in the location bar/omnibox any more.

You have to bookmark the javascript: link before it can be executed.
A better solution is using the built-in Developer tools, in which code can be pasted and executed in the current page:

  • Firefox: Ctrl Shift K - See Using the web console.
  • Chrome: Ctrl Shift J - See Developer tools.
like image 167
Rob W Avatar answered Sep 30 '22 08:09

Rob W


In Chrome, you add a tab, open bookmarks - click Other Bookmarks, right click in the bookmarks area, click add new page - and paste the URL.

In Firefox, just manage your bookmarks, click on the folder, right click in the bookmarks section and click New Bookmark.

like image 41
greyghostie Avatar answered Sep 30 '22 07:09

greyghostie