diff --git a/core/messenger.js b/core/messenger.js index 1e6487c0..870ce7b9 100644 --- a/core/messenger.js +++ b/core/messenger.js @@ -44,15 +44,6 @@ messenger._handleMessageReceived = function (message, sender, sendResponse) { sendResponse({'value': stateManager.tabs[value].injections}); return MessageResponse.SYNCHRONOUS; - case 'tab:inject': - chrome.scripting.executeScript(value, { - 'code': `window.addEventListener('load', () => { - document.getElementById('domain').value = '${message.url}'; - });`, - 'runAt': 'document_idle' - }); - return MessageResponse.SYNCHRONOUS; - case 'domain:fetch-is-allowlisted': sendResponse({'value': Boolean(helpers.checkAllowlisted(value, requestAnalyzer.allowlistedDomains))}); return MessageResponse.SYNCHRONOUS; diff --git a/manifest.json b/manifest.json index c0118899..1fb040f8 100644 --- a/manifest.json +++ b/manifest.json @@ -25,8 +25,7 @@ "storage", "webNavigation", "webRequest", - "webRequestBlocking", - "scripting" + "webRequestBlocking" ], "host_permissions": [ diff --git a/pages/popup/popup.js b/pages/popup/popup.js index 5cff400f..07d95f1b 100644 --- a/pages/popup/popup.js +++ b/pages/popup/popup.js @@ -503,8 +503,10 @@ popup._onTestingUtilityLinkClicked = function (ev) { chrome.tabs.create({ 'url': Links.LOCALCDN_TEST_WEBSITE, 'active': ev.button === 0, - }, function (tab) { - popup._injectDomain(tab.id); + }, function () { + setTimeout(function () { + popup._close(); + }, 200); }); } }; @@ -560,19 +562,6 @@ popup._onStatisticsButtonClicked = function (ev) { } }; -popup._injectDomain = function (tabId) { - let message = { - 'topic': 'tab:inject', - 'value': tabId, - 'url': popup._targetTab.url - }; - - chrome.runtime.sendMessage(message); - setTimeout(function () { - popup._close(); - }, 200); -}; - popup._onOptionsButtonClicked = function () { chrome.runtime.openOptionsPage(); return window.close();