[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser] 01/03: fixup! Bug 40925: Implemented the Security Level component



This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch tor-browser-102.5.0esr-12.5-1
in repository tor-browser.

commit d2b71fb57d52f9ca5f3e8d351a786fe154c3e9c0
Author: Henry Wilkes <henry@xxxxxxxxxxxxxx>
AuthorDate: Fri Nov 18 14:52:41 2022 +0000

    fixup! Bug 40925: Implemented the Security Level component
    
    Clean up some unnecessary imports and use var instead of const for
    exported variables.
---
 .../securitylevel/content/securityLevel.js         | 38 +++++-----------------
 1 file changed, 8 insertions(+), 30 deletions(-)

diff --git a/browser/components/securitylevel/content/securityLevel.js b/browser/components/securitylevel/content/securityLevel.js
index 2ef7fc1648df..ee84c9d342a2 100644
--- a/browser/components/securitylevel/content/securityLevel.js
+++ b/browser/components/securitylevel/content/securityLevel.js
@@ -2,15 +2,11 @@
 
 /* global AppConstants, Services, openPreferences, XPCOMUtils */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
 XPCOMUtils.defineLazyModuleGetters(this, {
-  CustomizableUI: "resource:///modules/CustomizableUI.jsm",
   PanelMultiView: "resource:///modules/PanelMultiView.jsm",
 });
 
-const SecurityLevels = Object.freeze(["", "safest", "safer", "", "standard"]);
+var SecurityLevels = Object.freeze(["", "safest", "safer", "", "standard"]);
 
 XPCOMUtils.defineLazyGetter(this, "SecurityLevelStrings", () => {
   let strings = {
@@ -75,7 +71,7 @@ XPCOMUtils.defineLazyGetter(this, "SecurityLevelStrings", () => {
 
   Getters and Setters for relevant torbutton prefs
 */
-const SecurityLevelPrefs = {
+var SecurityLevelPrefs = {
   security_slider_pref: "browser.security_level.security_slider",
   security_custom_pref: "browser.security_level.security_custom",
 
@@ -124,7 +120,7 @@ const SecurityLevelPrefs = {
   Controls init and update of the security level toolbar button
 */
 
-const SecurityLevelButton = {
+var SecurityLevelButton = {
   _securityPrefsBranch: null,
 
   _configUIFromPrefs() {
@@ -231,7 +227,7 @@ const SecurityLevelButton = {
     SecurityLevelPanel.show();
     aEvent.stopPropagation();
   },
-}; /* Security Level Button */
+}; /* SecurityLevelButton */
 
 /*
   Security Level Panel Code
@@ -239,7 +235,7 @@ const SecurityLevelButton = {
   Controls init and update of the panel in the security level hanger
 */
 
-const SecurityLevelPanel = {
+var SecurityLevelPanel = {
   _securityPrefsBranch: null,
   _panel: null,
   _anchor: null,
@@ -405,7 +401,7 @@ const SecurityLevelPanel = {
   onPopupHidden(event) {
     SecurityLevelButton.button.removeAttribute("open");
   },
-}; /* Security Level Panel */
+}; /* SecurityLevelPanel */
 
 /*
   Security Level Preferences Code
@@ -413,7 +409,7 @@ const SecurityLevelPanel = {
   Code to handle init and update of security level section in about:preferences#privacy
 */
 
-const SecurityLevelPreferences = {
+var SecurityLevelPreferences = {
   _securityPrefsBranch: null,
 
   _populateXUL() {
@@ -590,22 +586,4 @@ const SecurityLevelPreferences = {
   restoreDefaults() {
     SecurityLevelPrefs.securityCustom = false;
   },
-}; /* Security Level Prefereces */
-
-Object.defineProperty(this, "SecurityLevelButton", {
-  value: SecurityLevelButton,
-  enumerable: true,
-  writable: false,
-});
-
-Object.defineProperty(this, "SecurityLevelPanel", {
-  value: SecurityLevelPanel,
-  enumerable: true,
-  writable: false,
-});
-
-Object.defineProperty(this, "SecurityLevelPreferences", {
-  value: SecurityLevelPreferences,
-  enumerable: true,
-  writable: false,
-});
+}; /* SecurityLevelPreferences */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits