From 1b6038e36335bdb4c4d1b92026bab79cd422c742 Mon Sep 17 00:00:00 2001 From: Carl Gorringe Date: Sat, 12 Oct 2024 03:40:17 -0700 Subject: [PATCH] enable webRequest --- webextension/manifest.json | 3 ++- webextension/scripts/background.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/webextension/manifest.json b/webextension/manifest.json index afd1fcfb..baeb2e79 100644 --- a/webextension/manifest.json +++ b/webextension/manifest.json @@ -30,7 +30,8 @@ "contextMenus", "notifications", "storage", - "scripting" + "scripting", + "webRequest" ], "host_permissions": [ "https://archive.org/*", diff --git a/webextension/scripts/background.js b/webextension/scripts/background.js index 70337f27..f99bba0b 100644 --- a/webextension/scripts/background.js +++ b/webextension/scripts/background.js @@ -436,7 +436,7 @@ chrome.action.onClicked.addListener((tab) => { // ) // chrome.webRequest.onErrorOccurred is not supported in manifest v3. -/* + // Checks for error in page loading such as when a domain doesn't exist. // chrome.webRequest.onErrorOccurred.addListener((details) => { @@ -475,7 +475,7 @@ chrome.webRequest.onCompleted.addListener((details) => { } } }, { urls: [''], types: ['main_frame'] }) -*/ + // Check for 404 Not Found and other status errors. // pass these keys in details: { tabId, statusCode, url } //