From 7bc80b7fae65a7fbbbde9f1495d79d074f161998 Mon Sep 17 00:00:00 2001 From: Simeon Vincent Date: Sun, 9 Mar 2025 17:20:19 -0700 Subject: [PATCH] Revert to MV2 --- stored-credentials/auth.js | 4 ---- stored-credentials/manifest.json | 7 ++----- stored-credentials/options/options.js | 3 --- stored-credentials/storage.js | 3 --- 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/stored-credentials/auth.js b/stored-credentials/auth.js index a1ab6be..226a163 100644 --- a/stored-credentials/auth.js +++ b/stored-credentials/auth.js @@ -1,8 +1,4 @@ -// Polyfill the "browser" global in Chrome. -globalThis.browser ??= chrome; - let target = "https://httpbin.org/basic-auth/*"; - let pendingRequests = []; /* diff --git a/stored-credentials/manifest.json b/stored-credentials/manifest.json index 11961c8..5650e23 100644 --- a/stored-credentials/manifest.json +++ b/stored-credentials/manifest.json @@ -1,6 +1,6 @@ { "description": "Performs basic authentication by supplying stored credentials.", - "manifest_version": 3, + "manifest_version": 2, "name": "stored-credentials", "version": "2.0", "homepage_url": "https://github.com/mdn/webextensions-examples/tree/master/stored-credentials", @@ -26,10 +26,7 @@ "webRequest", "webRequestBlocking", "webRequestAuthProvider", - "storage" - ], - - "host_permissions": [ + "storage", "https://httpbin.org/basic-auth/*" ] } diff --git a/stored-credentials/options/options.js b/stored-credentials/options/options.js index 80b7d64..bb0477d 100644 --- a/stored-credentials/options/options.js +++ b/stored-credentials/options/options.js @@ -1,6 +1,3 @@ -// Polyfill the "browser" global in Chrome. -globalThis.browser ??= chrome; - const usernameInput = document.querySelector("#username"); const passwordInput = document.querySelector("#password"); diff --git a/stored-credentials/storage.js b/stored-credentials/storage.js index c994332..847d1af 100644 --- a/stored-credentials/storage.js +++ b/stored-credentials/storage.js @@ -1,6 +1,3 @@ -// Polyfill the "browser" global in Chrome. -globalThis.browser ??= chrome; - /* Default settings. Initialize storage to these values. */