summaryrefslogtreecommitdiffstats
path: root/application/basilisk/base/content/utilityOverlay.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-03-25 17:47:59 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-03-25 17:47:59 +0100
commit917a2c450f08ab4c934c9938319f10a1114272b4 (patch)
tree79394bdbef8c5bc90734918a9f862efaf6ec2e1a /application/basilisk/base/content/utilityOverlay.js
parenteb77e289bbe056b58051db0fa868e95da803aa0a (diff)
parenta1ad1d835b66e9300cc011244a23aea5d660baf1 (diff)
downloadUXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar
UXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar.gz
UXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar.lz
UXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar.xz
UXP-917a2c450f08ab4c934c9938319f10a1114272b4.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP
Diffstat (limited to 'application/basilisk/base/content/utilityOverlay.js')
-rw-r--r--application/basilisk/base/content/utilityOverlay.js20
1 files changed, 5 insertions, 15 deletions
diff --git a/application/basilisk/base/content/utilityOverlay.js b/application/basilisk/base/content/utilityOverlay.js
index 38ca82f55..c576aef9e 100644
--- a/application/basilisk/base/content/utilityOverlay.js
+++ b/application/basilisk/base/content/utilityOverlay.js
@@ -61,16 +61,6 @@ 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
@@ -137,7 +127,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
// ignoreButton allows "middle-click paste" to use function without always opening in a new window.
var middle = !ignoreButton && e.button == 1;
- var middleUsesTabs = getBoolPref("browser.tabs.opentabfor.middleclick", true);
+ var middleUsesTabs = Services.prefs.getBoolPref("browser.tabs.opentabfor.middleclick", true);
// Don't do anything special with right-mouse clicks. They're probably clicks on context menu items.
@@ -145,7 +135,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
if (metaKey || (middle && middleUsesTabs))
return shift ? "tabshifted" : "tab";
- if (alt && getBoolPref("browser.altClickSave", false))
+ if (alt && Services.prefs.getBoolPref("browser.altClickSave", false))
return "save";
if (shift || (middle && !middleUsesTabs))
@@ -342,7 +332,7 @@ function openLinkIn(url, where, params) {
if (loadInBackground == null) {
loadInBackground = aFromChrome ?
false :
- getBoolPref("browser.tabs.loadInBackground");
+ Services.prefs.getBoolPref("browser.tabs.loadInBackground");
}
let uriObj;
@@ -652,7 +642,7 @@ function getShellService()
function isBidiEnabled() {
// first check the pref.
- if (getBoolPref("bidi.browser.ui", false))
+ if (Services.prefs.getBoolPref("bidi.browser.ui", false))
return true;
// then check intl.uidirection.<locale>
@@ -914,7 +904,7 @@ function openHelpLink(aHelpTopic, aCalledFromModal, aWhere) {
function openPrefsHelp() {
// non-instant apply prefwindows are usually modal, so we can't open in the topmost window,
// since its probably behind the window.
- var instantApply = getBoolPref("browser.preferences.instantApply");
+ var instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply");
var helpTopic = document.getElementsByTagName("prefwindow")[0].currentPane.helpTopic;
openHelpLink(helpTopic, !instantApply);