[Pale-Moon] Issue MoonchildProductions/UXP#516 - Remove named function syntax from palemoon/components/pageinfo.

This commit is contained in:
athenian200 2020-02-06 06:50:43 -06:00 • committed by Roy Tam
commit 85de6bf035

View file

@ -18,21 +18,21 @@ var gPrefs;
var gUsageRequest; var gUsageRequest;
var gPermObj = { var gPermObj = {
image: function getImageDefaultPermission() image: function ()
{ {
if (gPrefs.getIntPref("permissions.default.image") == IMAGE_DENY) { if (gPrefs.getIntPref("permissions.default.image") == IMAGE_DENY) {
return DENY; return DENY;
} }
return ALLOW; return ALLOW;
}, },
popup: function getPopupDefaultPermission() popup: function ()
{ {
if (gPrefs.getBoolPref("dom.disable_open_during_load")) { if (gPrefs.getBoolPref("dom.disable_open_during_load")) {
return DENY; return DENY;
} }
return ALLOW; return ALLOW;
}, },
cookie: function getCookieDefaultPermission() cookie: function ()
{ {
if (gPrefs.getIntPref("network.cookie.cookieBehavior") == COOKIE_DENY) { if (gPrefs.getIntPref("network.cookie.cookieBehavior") == COOKIE_DENY) {
return DENY; return DENY;
@ -42,28 +42,28 @@ var gPermObj = {
} }
return ALLOW; return ALLOW;
}, },
"desktop-notification": function getNotificationDefaultPermission() "desktop-notification": function ()
{ {
if (!gPrefs.getBoolPref("dom.webnotifications.enabled")) { if (!gPrefs.getBoolPref("dom.webnotifications.enabled")) {
return DENY; return DENY;
} }
return UNKNOWN; return UNKNOWN;
}, },
install: function getInstallDefaultPermission() install: function ()
{ {
if (Services.prefs.getBoolPref("xpinstall.whitelist.required")) { if (Services.prefs.getBoolPref("xpinstall.whitelist.required")) {
return DENY; return DENY;
} }
return ALLOW; return ALLOW;
}, },
geo: function getGeoDefaultPermissions() geo: function ()
{ {
if (!gPrefs.getBoolPref("geo.enabled")) { if (!gPrefs.getBoolPref("geo.enabled")) {
return DENY; return DENY;
} }
return ALLOW; return ALLOW;
}, },
plugins: function getPluginsDefaultPermissions() plugins: function ()
{ {
return UNKNOWN; return UNKNOWN;
}, },