From caab96c9691509657d6e1ca16fb4fe645df651c4 Mon Sep 17 00:00:00 2001 From: Roy Tam Date: Sat, 30 Mar 2019 06:49:19 +0800 Subject: [PATCH] utilityOverlay: restore getBoolPref for compatibility --- application/basilisk/base/content/utilityOverlay.js | 10 ++++++++++ application/palemoon/base/content/utilityOverlay.js | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/application/basilisk/base/content/utilityOverlay.js b/application/basilisk/base/content/utilityOverlay.js index f3ebf3b7eb..aeef5879c3 100644 --- a/application/basilisk/base/content/utilityOverlay.js +++ b/application/basilisk/base/content/utilityOverlay.js @@ -60,6 +60,16 @@ function openTopWin(url) { openUILinkIn(url, "current"); } +function getBoolPref(prefname, def) +{ + try { + return Services.prefs.getBoolPref(prefname); + } + catch(er) { + return def; + } +} + /* openUILink handles clicks on UI elements that cause URLs to load. * * As the third argument, you may pass an object with the same properties as diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js index c2a8baeed5..05da436056 100644 --- a/application/palemoon/base/content/utilityOverlay.js +++ b/application/palemoon/base/content/utilityOverlay.js @@ -75,6 +75,16 @@ function openTopWin(url) { openUILinkIn(url, "current"); } +function getBoolPref(prefname, def) +{ + try { + return Services.prefs.getBoolPref(prefname); + } + catch(er) { + return def; + } +} + /* openUILink handles clicks on UI elements that cause URLs to load. * * As the third argument, you may pass an object with the same properties as