We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

ค้นหาฝ่ายสนับสนุน

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

เรียนรู้เพิ่มเติม

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);

}