Is there any method in about:config to enable in the URL bar JavaScript prefixed by javascript: to run in Firefox?

browser.urlbar.filter.javascript: false doesn't seem to work.


browser.urlbar.filter.javascript: false doesn't seem to work.

Indeed it doesn't. You can work around it using Bookmarks (at least until Mozilla block that as well):

  • Set up a Bookmark with the location: javascript:%s

  • Set the keyword for that bookmark as: javascript

Now you can run JavaScript from the address bar in the format: javascript alert('Hello World') which is very similar to the old javascript:alert('Hello World') method - it's just that the colon needs to be replaced by a space.

Source Executing JavaScript in Firefox address bar - AutoHotkey Community

|improve this answer|||||

The setting you are trying to use only controls whether javascript: URLs show up as auto completes when you type in the URL Bar. From http://kb.mozillazine.org/Browser.urlbar.filter.javascript

Filter out “javascript:” URLs from appearing in the Location Bar autocomplete dropdown. (Default)

Allow “javascript:” URLs to appear in the dropdown.

It seems javascript: URLs are completely disabled in newer version of firefox.

However you should still be able to save javascript: URLs as bookmarks and activate them by clicking on them.

Other people have noticed this too:


|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.