Ticket #27760: Receive-startup-message-using-NoScript-10.1.9.2-protocol.patch

File Receive-startup-message-using-NoScript-10.1.9.2-protocol.patch, 993 bytes (added by rustybird, 8 months ago)
  • src/modules/noscript-control.js

    From 466c5b95bb5bb2e8f2f6dfa764d63ce13f8656c8 Mon Sep 17 00:00:00 2001
    From: Rusty Bird <rustybird@net-c.com>
    Date: Tue, 18 Sep 2018 10:50:42 +0000
    Subject: [PATCH] Receive startup message using NoScript >= 10.1.9.2 protocol
    
    ---
     src/modules/noscript-control.js | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/modules/noscript-control.js b/src/modules/noscript-control.js
    index c1442950..621f2b7f 100644
    a b var initialize = () => { 
    129129    // bind the security_slider pref to the NoScript settings.
    130130    let messageListener = (a,b,c) => {
    131131      log(3, `Message received from NoScript: ${JSON.stringify([a,b,c])}`);
    132       if (a._messageName != "started" && a._messageName != "pageshow") {
     132      if (!["started", "pageshow"].includes(a.__meta.name)) {
    133133        return;
    134134      }
    135135      extensionContext.api.browser.runtime.onMessage.removeListener(messageListener);