Do not watch for blank page in content script

This commit is contained in:
Ivan Grachev 2022-04-28 23:22:02 +03:00
parent e2cab14fef
commit 8e43aa4af1

View File

@ -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" });
}
}
});