Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Running Javascript in Navigation Bar (URL)

  • 6 replies
  • 1279 have this problem
  • 29 views
  • Last reply by yingted

more options

Question: How can I enable in Firefox (currently 7 - beta) to run javascript in the url bar. I mean running: javascript:alert('iaurt'); in the url bar. I remember this worked on previous firefox versions... And this works in IE but on Firefox it doesn't :(

Question: How can I enable in Firefox (currently 7 - beta) to run javascript in the url bar. I mean running: javascript:alert('iaurt'); in the url bar. I remember this worked on previous firefox versions... And this works in IE but on Firefox it doesn't :(

All Replies (6)

more options

You can no longer run JavaScript code via the location bar in Firefox 6 and later.
You can see an error message in the Tools > Error Console.
That code now gets a null principal for security reasons and doesn't have any effect (Bug 656433).
You need to create a (keyword) bookmarklet and run the code by invoking that bookmark.

NoScript can allow you to run such code via the location bar, see:

more options

Killing advanced features because "average" users don't need or can't handle them is becoming Mozilla MO. Bye status bar, bye navigation bar javascript, bye market share, hello "hover a link for 5 minutes and the destination appears where the status bar should be".

At least add about:config entries to restore the useful features that keep being removed.

Modified by fatazize

more options

Although entering JS through the URL bar has been disabled for very good security reasons, in the latest Firefox release it's possible to do the same but by different means.

If you go to the "Web Developer" menu (or if you're on a Mac, Tools > Web Developer) and select "Scratchpad" up will pop a box where you can enter some JS, right click and "Run" it on the webpage. The result is exactly the same as one would have by entering stuff into the URL bar.

more options

You can install this add-on: InheritPrincipal :: Add-ons for Firefox

more options

Ctrl+Shift+K

more options

Ctrl+/ without any text selected shows the add-on bar, which is a less powerful version of the status bar.