From 8e43aa4af17e6138f9c783c44e52c0037f6434c7 Mon Sep 17 00:00:00 2001 From: Ivan Grachev Date: Thu, 28 Apr 2022 23:22:02 +0300 Subject: [PATCH] Do not watch for blank page in content script --- Safari Shared/Resources/content.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Safari Shared/Resources/content.js b/Safari Shared/Resources/content.js index 8140ec24..7883ddfb 100644 --- a/Safari Shared/Resources/content.js +++ b/Safari Shared/Resources/content.js @@ -1,8 +1,6 @@ -const pendingRequestsIds = new Set(); +// Copyright © 2022 Tokenary. All rights reserved. -if (window.location.href.startsWith("https://tokenary.io/blank")) { - browser.runtime.sendMessage({ subject: "wakeUp" }); -} +const pendingRequestsIds = new Set(); function injectScript() { try { @@ -135,11 +133,6 @@ function didTapExtensionButton() { browser.runtime.onMessage.addListener((request, sender, sendResponse) => { if ("didTapExtensionButton" in request) { didTapExtensionButton(); - } else { - if (pendingRequestsIds.has(request.id)) { - sendToInpage(request, request.id); - browser.runtime.sendMessage({ subject: "activateTab" }); - } } });