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.
2 Answers
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:%sSet the keyword for that bookmark as:
javascriptNow you can run JavaScript from the address bar in the format:
javascript alert('Hello World')which is very similar to the oldjavascript: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
3The setting you are trying to use only controls whether javascript: URLs show up as auto completes when you type in the URL Bar. From
True
Filter out “javascript:” URLs from appearing in the Location Bar autocomplete dropdown. (Default)False
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: