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

[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-153.4.0esr-16.0-1] fixup! BB 41581: Hide NoScript extension's toolbar button by default.



Title: GitLab

brizental pushed to branch mullvad-browser-153.4.0esr-16.0-1 at The Tor Project / Applications / Mullvad Browser

Commits:

  • 4ef5a05d
    by Beatriz Rizental at 2026-10-06T16:04:38-03:00
    fixup! BB 41581: Hide NoScript extension's toolbar button by default.
    
    The widget is created once per browser window, so the extensions.hideNoScript
    pref observer was added for every window and never removed. It kept each
    closed window alive until shutdown. Remove it when the window unloads.
    

1 changed file:

Changes:

  • browser/components/extensions/parent/ext-browserAction.js
    ... ... @@ -304,12 +304,20 @@ this.browserAction = class extends ExtensionAPIPersistent {
    304 304
               const changeNoScriptVisibility = () => {
    
    305 305
                 node.hidden = Services.prefs.getBoolPref(HIDE_NO_SCRIPT_PREF, true);
    
    306 306
               };
    
    307
    -          // Since we expect the NoScript widget to only be destroyed on exit,
    
    308
    -          // we do not set up to remove the observer.
    
    309 307
               Services.prefs.addObserver(
    
    310 308
                 HIDE_NO_SCRIPT_PREF,
    
    311 309
                 changeNoScriptVisibility
    
    312 310
               );
    
    311
    +          document.defaultView.addEventListener(
    
    312
    +            "unload",
    
    313
    +            () => {
    
    314
    +              Services.prefs.removeObserver(
    
    315
    +                HIDE_NO_SCRIPT_PREF,
    
    316
    +                changeNoScriptVisibility
    
    317
    +              );
    
    318
    +            },
    
    319
    +            { once: true }
    
    320
    +          );
    
    313 321
               changeNoScriptVisibility();
    
    314 322
             }
    
    315 323
     
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx