For some Selinium test work, I need to keep JavaScript enabled in Firefox... yet specifically disable JavaScript's ability to launch alert boxes (Selenium doesn't yet handle them in the "onload" event). After some searching online, I found that you can do this by setting the following user preference:
user_pref("capability.policy.default.Window.alert", "noAccess");
You can put this in the user.js for a particular Firefox profile, but I don't use multiple profiles. So I added it by:
- putting "
about:config" in my address bar - right-clicking and selecting "new"
- adding the name-value pair above
This works! Firefox no longer supports JavaScript alert boxes. However, now that I am through testing... the issue is that I cannot UNDO this.
When I go back to "about:config", I do not find that name-value pair in the list of preferences. I likewise find nothing in "prefs.js". Where did that preference get saved? How I nuke it, and return to normal?
about:configuntil Firefox was restarted. – grawity Feb 12 '11 at 21:22