Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Learn More

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

Running Javascript in Navigation Bar (URL)

  • 6 risposte
  • 1279 hanno questo problema
  • 32197 visualizzazioni
  • Ultima risposta di 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 :(

Tutte le risposte (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.

Modificato da fatazize il

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.