搜尋 Mozilla 技術支援網站

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

了解更多

How to add customization logic around lockPref() when using it in .cfg file

  • 1 回覆
  • 1 有這個問題
  • 2 次檢視
  • 最近回覆由 cor-el

more options

I wanted a way to apply the lockPref only when certain conditions are met and also add some customization logic around the lockPref functionality. How can I acheive this?. Any sample script to acheive this is greatly appreciated.

User Agent

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

I wanted a way to apply the lockPref only when certain conditions are met and also add some customization logic around the lockPref functionality. How can I acheive this?. Any sample script to acheive this is greatly appreciated. == User Agent == Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

被選擇的解決方法

mozilla.cfg is a JavaScript file, so you can try to add the instruction to that file to see if that works. What kind of customizationlogic do you have in mind?

if (condition) {

lockPref(prefName, prefValue);

}

從原來的回覆中察看解決方案 👍 0

所有回覆 (1)

more options

選擇的解決方法

mozilla.cfg is a JavaScript file, so you can try to add the instruction to that file to see if that works. What kind of customizationlogic do you have in mind?

if (condition) {

lockPref(prefName, prefValue);

}