X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

Running Javascript in Navigation Bar (URL)

Eek
Posted

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 :(

Additional System Details

Installed Plug-ins

  • Google Update
  • Shockwave Flash 10.2 r153
  • Yahoo Application State Plugin version 1.0.0.7
  • Picasa plugin
  • Adobe PDF Plug-In For Firefox and Netscape 10.0.0
  • The plug-in allows you to open and edit files using Microsoft Office applications
  • Office Authorization plug-in for NPAPI browsers

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20100101 Firefox/7.0

More Information

Application Basics
Name
Firefox
Version
7.0
User Agent
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20100101 Firefox/7.0
Profile Directory
Open Containing Folder
Enabled Plugins
about:plugins
Build Configuration
about:buildconfig
Extensions
Name
Version
Enabled
ID
Cookies Manager+
1.5.1
true
{bb6bc1bb-f824-4702-90cd-35e2fb24f25d}
Download Statusbar
0.9.8
true
{D4DD63FA-01E4-46a7-B6B1-EDAB7D6AD389}
Firebug
1.9.0a2
true
firebug@software.joehewitt.com
FireFTP
1.99.5
true
{a7c6cf7f-112c-4500-a7ea-39801a327e5f}
Screenshot Pimp
3.3.51
true
{056d0610-e44d-11df-bccf-0800200c9a66}
Test Pilot
1.1.3
true
testpilot@labs.mozilla.com
User Agent RG
1.0
true
useragentrg@mozilla.org
YSlow
3.0.4
true
yslow@yahoo-inc.com
Adobe Acrobat - Create PDF
1.0
false
web2pdfextension@web2pdf.adobedotcom
FEBE
7.0.2
false
{4BBDD651-70CF-4821-84F8-2B918CF89CA3}
Google Shortcuts
2.1.6
false
{5C46D283-ABDE-4dce-B83C-08881401921C}
uTorrentBar Community Toolbar
3.6.0.10
false
{bf7380fa-e3b4-4db2-af3e-9d8783a45bfc}
View Cookies
1.10.1
false
{8F6A6FD9-0619-459f-B9D0-81DE065D4E21}
Modified Preferences
Name
Value
accessibility.typeaheadfind.flashBar
0
browser.history_expire_days.mirror
180
browser.places.smartBookmarksVersion
2
browser.startup.homepage_override.buildID
20110908135051
browser.startup.homepage_override.mstone
rv:7.0
extensions.lastAppVersion
7.0
network.cookie.prefsMigrated
true
network.http.max-persistent-connections-per-server
4
places.database.lastMaintenance
1316416112
places.history.expiration.transient_current_max_pages
128785
places.last_vacuum
1290368116
print.print_printer
Adobe PDF
print.printer_Adobe_PDF.print_bgcolor
false
print.printer_Adobe_PDF.print_bgimages
false
print.printer_Adobe_PDF.print_command
print.printer_Adobe_PDF.print_downloadfonts
false
print.printer_Adobe_PDF.print_edge_bottom
0
print.printer_Adobe_PDF.print_edge_left
0
print.printer_Adobe_PDF.print_edge_right
0
print.printer_Adobe_PDF.print_edge_top
0
print.printer_Adobe_PDF.print_evenpages
true
print.printer_Adobe_PDF.print_footercenter
print.printer_Adobe_PDF.print_footerleft
&PT
print.printer_Adobe_PDF.print_footerright
&D
print.printer_Adobe_PDF.print_headercenter
print.printer_Adobe_PDF.print_headerleft
&T
print.printer_Adobe_PDF.print_headerright
&U
print.printer_Adobe_PDF.print_in_color
true
print.printer_Adobe_PDF.print_margin_bottom
0.5
print.printer_Adobe_PDF.print_margin_left
0.5
print.printer_Adobe_PDF.print_margin_right
0.5
print.printer_Adobe_PDF.print_margin_top
0.5
print.printer_Adobe_PDF.print_oddpages
true
print.printer_Adobe_PDF.print_orientation
0
print.printer_Adobe_PDF.print_page_delay
50
print.printer_Adobe_PDF.print_pagedelay
500
print.printer_Adobe_PDF.print_paper_data
9
print.printer_Adobe_PDF.print_paper_height
11,00
print.printer_Adobe_PDF.print_paper_size_type
0
print.printer_Adobe_PDF.print_paper_size_unit
1
print.printer_Adobe_PDF.print_paper_width
8,50
print.printer_Adobe_PDF.print_reversed
false
print.printer_Adobe_PDF.print_scaling
1,00
print.printer_Adobe_PDF.print_shrink_to_fit
true
print.printer_Adobe_PDF.print_to_file
false
print.printer_Adobe_PDF.print_unwriteable_margin_bottom
0
print.printer_Adobe_PDF.print_unwriteable_margin_left
0
print.printer_Adobe_PDF.print_unwriteable_margin_right
0
print.printer_Adobe_PDF.print_unwriteable_margin_top
0
privacy.cpd.cookies
false
privacy.cpd.extensions-dta
true
privacy.cpd.formdata
false
privacy.cpd.sessions
false
privacy.sanitize.migrateFx3Prefs
true
privacy.sanitize.timeSpan
0
security.warn_viewing_mixed
false
Graphics
Adapter Description
ATI Mobility Radeon HD 2600
Vendor ID
1002
Device ID
9581
Adapter RAM
512
Adapter Drivers
aticfx64 aticfx64 aticfx32 aticfx32 atiumd64 atidxx64 atiumdag atidxx32 atiumdva atiumd6a atitmm64
Driver Version
8.881.0.0
Driver Date
7-28-2011
Direct2D Enabled
true
DirectWrite Enabled
true (6.1.7601.17563)
ClearType Parameters
ClearType parameters not found
WebGL Renderer
Google Inc. -- ANGLE -- OpenGL ES 2.0 (ANGLE 0.0.0.686)
GPU Accelerated Windows
1/1 Direct3D 10

cor-el
  • Top 10 Contributor
  • Moderator
10738 solutions 96600 answers

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:

fatazize 0 solutions 1 answers

Helpful Reply

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

Leo McArdle 10 solutions 38 answers

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.

yingted 0 solutions 3 answers

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

yingted 0 solutions 3 answers

Helpful Reply

Ctrl+Shift+K

yingted 0 solutions 3 answers

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