Skip to content

Commit

Permalink
remove declarativeNetRequest request from manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Anish Sarangi committed May 22, 2024
1 parent 8e2623e commit 6a395cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
14 changes: 2 additions & 12 deletions webextension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@
"notifications",
"storage",
"scripting",
"webRequest",
"declarativeNetRequestWithHostAccess",
"declarativeNetRequest",
"declarativeNetRequestFeedback"
"webRequest"
],
"host_permissions":[
"https://archive.org/*",
Expand All @@ -58,12 +55,5 @@
"web_accessible_resources": [{
"resources":[ "/css/archive.css","/images/*"],
"matches": ["<all_urls>"]
}],
"declarative_net_request" : {
"rule_resources" : [{
"id": "ruleset_1",
"enabled": true,
"path": "rules_1.json"
}]
}
}]
}
15 changes: 0 additions & 15 deletions webextension/rules_1.json

This file was deleted.

4 changes: 2 additions & 2 deletions webextension/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ importScripts('utils.js')
// const SPN_RETRY = 6000
let tabIdPromise

// not required because in manifest v3, a new header is set using declarativeNetRequest rules
// not required because in manifest v3, we use different subdomain of hostURLs for different browsers
// updates User-Agent header in Chrome & Firefox, but not in Safari
// function rewriteUserAgentHeader(e) {
// for (let header of e.requestHeaders) {
Expand Down Expand Up @@ -471,7 +471,7 @@ chrome.action.onClicked.addListener((tab) => {
})

// chrome.webRequest.onBeforeSendHeaders is not supported in manifest v3 and currently we are not looking to rewrite the user-agent
// as we already use diffent host-names for different endpoints
// as we already use diffent host-names for different browsers

// chrome.webRequest.onBeforeSendHeaders.addListener(
// rewriteUserAgentHeader,
Expand Down

0 comments on commit 6a395cc

Please sign in to comment.