搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Cannot lock plugin state preference

more options

Hello.

I have two online banking plugins that I want to stay on "ask to activate" mode (value 1 for "plugin.state.npsf_bb" and "plugin.state.npsf_abn" preferences in about:config) but somehow manage to set themselves back to "always activate" (value 2 for the preferences) every single time I restart Firefox.

I had posted this problem before (here: https://support.mozilla.org/en-US/questions/1019124) and even found an acceptable solution, which is was to use the CCK Wizard addon (https://addons.mozilla.org/pt-BR/firefox/addon/cck/) to make an addon (XPI file) for the sole purpose of locking those two preferences and then install it. That really worked, but eventually I found that it was this custom-made addon what was causing malfunctioning in many Google services (couldn't use Drive, nor create new events in Calendar, etc.). So now I am back searching a new solution.

Since the solution was to simply lock those two preferences, I looked for a direct way of doing it and found this: http://kb.mozillazine.org/Locking_preferences, which I followed through. I created a mozilla.cfg file with these contents:

// lockPref("plugin.state.npsf_abn", 1); lockPref("plugin.state.npsf_bb", 1);

and moved it to C:\Program Files (x86)\Mozilla Firefox. Then created a local-settings.js file, with these contents:

// pref("general.config.filename", "mozilla.cfg");

And placed it in C:\Program Files (x86)\Mozilla Firefox\defaults\pref.

Then I restarted Firefox, hoping it would work, but it didn't. Did I do something wrong? Or maybe are these instructions outdated regarding newer versions of Firefox?

I need help here, please...

PS.: there seems to be no option to format or embed code here and, to make it worse, this form collapses what I have pasted as the contents of the two files. The first one has three lines: the first is //, the second is lockPref("plugin.state.npsf_abn", 1); and the third is lockPref("plugin.state.npsf_bb", 1);. The second one has two lines: the first is //, the second is pref("general.config.filename", "mozilla.cfg");.

由 cloudchasingfun 於 修改

被選擇的解決方法

hi, your mozilla.cfg file looks alright. can you try to change the local-settings.js file (firefox install directory\defaults\pref\ should be the right place for it) & just put those two lines in it:

pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");
從原來的回覆中察看解決方案 👍 0

所有回覆 (6)

more options

Hello

Newer versions of Mozilla or Firefox store the all.js file in greprefs rather than defaults\pref

check if you have the greprefs in the

and put the pref("general.config.filename", "mozilla.cfg"); inside

any luck ?

thank you

more options

Thanks ideato, but the only greprefs folder in my HD is a subfolder of my LibreOffice installation. Actually, there's even no such folder structure neither: "C:\Program Files\mozilla.org\Mozilla\greprefs". Firefox is installed in "C:\Program Files (x86)\Mozilla Firefox" and there I see the following subfolders: browser, defaults, dictionaries, uninstall, webapprt.

more options

Any help? Please...

more options

選擇的解決方法

hi, your mozilla.cfg file looks alright. can you try to change the local-settings.js file (firefox install directory\defaults\pref\ should be the right place for it) & just put those two lines in it:

pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");
more options

You can find a local-settings.js file as a data URI in this thread:

(there is currently a bug on this forum that prevents white-space:pre-wrap from getting applied to the first post)

more options

Thank you both philipp and cor-el. I guess what was missing is the line pref("general.config.obscure_value", 0); in my local-settings.js file.

Thanks for the help.