How do I permanently disable JavaScript strict warnings in Firefox?

8,638

Solution 1

Go to about:config, and set javascript.options.strict to false.

If you run Firefox using the cfx tool (of the Addon SDK), then this will not help because the Addon SDK forces this preference to be true on start-up. To fix this, locate the directory containing the Addon SDK, open python-lib/cuddlefish/prefs.py and change

    'javascript.options.strict': True,

to

    'javascript.options.strict': False,

If you are bothered by deprecation warnings to the extent that they are not helpful (e.g. because you are a web developer that uses third-party libraries that are not going to be patched), then disable the warnings by setting devtools.errorconsole.deprecation_warnings to false at about:config.

Solution 2

In about:config, set this option to false:

extensions.firebug.showJSWarnings
Share:
8,638

Related videos on Youtube

Francis
Author by

Francis

Updated on September 18, 2022

Comments

  • Francis
    Francis over 1 year

    When I open Firefox (8 Beta and 7) and load a page with firebug open, I get a load of JavaScript strict warnings, so I disable JavaScript strict warnings so my page loads will speed up, which works until I restart Firefox. Every time I open Firefox, JavaScript strict warnings are enabled. I even tried turning them off through the about:config settings.

    How do I keep it off so I don't have to disable strict warnings every time I open Firefox?

    • Admin
      Admin over 12 years
      Tried those as well. strict.debug is set to false and strict will toggle to false, but when I restart the browser, it's always set to true.
    • Admin
      Admin over 12 years
      Have you tried running in safe mode / in new profile? I guess this behavior might be related with some extension, perhaps JavaScript-related extensions. Look in their configuration thoroughly.
  • RomanSt
    RomanSt over 9 years
    devtools.errorconsole.deprecation_warnings doesn't remove all the warnings. In particular, it doesn't remove the one caused by AdBlock.