From b0d7b1bb38ba3c6940d17c6974b5295d9a10e161 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 26 Apr 2018 05:39:27 +0200 Subject: Bug 996448 - Lazify the loading of PluralForm.jsm everywhere --- application/palemoon/base/content/browser.js | 10 ++-------- .../palemoon/components/preferences/aboutPermissions.js | 5 ++++- application/palemoon/modules/webrtcUI.jsm | 4 +++- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'application/palemoon') diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index c9f0aa4aa..556e7a2b7 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -83,14 +83,8 @@ this.__defineSetter__("AddonManager", function (val) { return this.AddonManager = val; }); -this.__defineGetter__("PluralForm", function() { - Cu.import("resource://gre/modules/PluralForm.jsm"); - return this.PluralForm; -}); -this.__defineSetter__("PluralForm", function (val) { - delete this.PluralForm; - return this.PluralForm = val; -}); +XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", + "resource://gre/modules/PluralForm.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "AboutHomeUtils", "resource:///modules/AboutHomeUtils.jsm"); diff --git a/application/palemoon/components/preferences/aboutPermissions.js b/application/palemoon/components/preferences/aboutPermissions.js index 31b48f88e..99c9d44ad 100644 --- a/application/palemoon/components/preferences/aboutPermissions.js +++ b/application/palemoon/components/preferences/aboutPermissions.js @@ -6,13 +6,16 @@ var Ci = Components.interfaces; var Cc = Components.classes; var Cu = Components.utils; +Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/PluralForm.jsm"); Cu.import("resource://gre/modules/DownloadUtils.jsm"); Cu.import("resource://gre/modules/AddonManager.jsm"); Cu.import("resource://gre/modules/NetUtil.jsm"); Cu.import("resource://gre/modules/ForgetAboutSite.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", + "resource://gre/modules/PluralForm.jsm"); + var gFaviconService = Cc["@mozilla.org/browser/favicon-service;1"]. getService(Ci.nsIFaviconService); diff --git a/application/palemoon/modules/webrtcUI.jsm b/application/palemoon/modules/webrtcUI.jsm index c957bfd9a..9427fc630 100644 --- a/application/palemoon/modules/webrtcUI.jsm +++ b/application/palemoon/modules/webrtcUI.jsm @@ -11,9 +11,11 @@ const Cc = Components.classes; const Ci = Components.interfaces; Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/PluralForm.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", + "resource://gre/modules/PluralForm.jsm"); + XPCOMUtils.defineLazyServiceGetter(this, "MediaManagerService", "@mozilla.org/mediaManagerService;1", "nsIMediaManagerService"); -- cgit v1.2.3 From c86fbfd0313ae6bd6c54ea8f4a28b42f7852b38c Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 26 Apr 2018 05:40:26 +0200 Subject: Bug 1115293 - Use "use strict" --- application/palemoon/components/preferences/aboutPermissions.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'application/palemoon') diff --git a/application/palemoon/components/preferences/aboutPermissions.js b/application/palemoon/components/preferences/aboutPermissions.js index 99c9d44ad..416bcdf34 100644 --- a/application/palemoon/components/preferences/aboutPermissions.js +++ b/application/palemoon/components/preferences/aboutPermissions.js @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +"use strict"; + var Ci = Components.interfaces; var Cc = Components.classes; var Cu = Components.utils; -- cgit v1.2.3 From 43caa48ecba88a60b7b0b84d19d928ada8b22b09 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 26 Apr 2018 06:17:52 +0200 Subject: Bug 1038811 - Push Notifications - Firefox front end changes for preferences, and permission notification --- application/palemoon/app/profile/palemoon.js | 1 + application/palemoon/base/content/browser.xul | 1 + application/palemoon/components/nsBrowserGlue.js | 41 ++++++++++++++++++++- .../components/preferences/aboutPermissions.js | 19 +++++++++- .../components/preferences/aboutPermissions.xul | 20 ++++++++++ .../en-US/chrome/browser/browser.properties | 9 +++++ .../browser/preferences/aboutPermissions.dtd | 2 + application/palemoon/themes/linux/Push-16.png | Bin 0 -> 606 bytes application/palemoon/themes/linux/Push-64.png | Bin 0 -> 8056 bytes application/palemoon/themes/linux/browser.css | 8 ++++ application/palemoon/themes/linux/jar.mn | 2 + .../themes/linux/preferences/aboutPermissions.css | 3 ++ application/palemoon/themes/osx/Push-16.png | Bin 0 -> 312 bytes application/palemoon/themes/osx/Push-64.png | Bin 0 -> 8490 bytes application/palemoon/themes/osx/browser.css | 8 ++++ application/palemoon/themes/osx/jar.mn | 2 + .../themes/osx/preferences/aboutPermissions.css | 3 ++ application/palemoon/themes/windows/Push-16.png | Bin 0 -> 704 bytes application/palemoon/themes/windows/Push-64.png | Bin 0 -> 8388 bytes application/palemoon/themes/windows/browser.css | 8 ++++ application/palemoon/themes/windows/jar.mn | 2 + .../windows/preferences/aboutPermissions.css | 3 ++ 22 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 application/palemoon/themes/linux/Push-16.png create mode 100644 application/palemoon/themes/linux/Push-64.png create mode 100644 application/palemoon/themes/osx/Push-16.png create mode 100644 application/palemoon/themes/osx/Push-64.png create mode 100644 application/palemoon/themes/windows/Push-16.png create mode 100644 application/palemoon/themes/windows/Push-64.png (limited to 'application/palemoon') diff --git a/application/palemoon/app/profile/palemoon.js b/application/palemoon/app/profile/palemoon.js index ee4a95d38..20919eca4 100644 --- a/application/palemoon/app/profile/palemoon.js +++ b/application/palemoon/app/profile/palemoon.js @@ -756,6 +756,7 @@ pref("goanna.handlerService.allowRegisterFromDifferentHost", false); pref("browser.geolocation.warning.infoURL", "http://www.palemoon.org/info-url/geolocation.shtml"); pref("browser.mixedcontent.warning.infoURL", "http://www.palemoon.org/info-url/mixedcontent.shtml"); +pref("browser.push.warning.infoURL", "https://www.mozilla.org/%LOCALE%/firefox/push/"); pref("browser.EULA.version", 3); pref("browser.rights.version", 3); diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul index c2553f295..6545e0ac2 100644 --- a/application/palemoon/base/content/browser.xul +++ b/application/palemoon/base/content/browser.xul @@ -449,6 +449,7 @@