We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b44705 commit 18383e9Copy full SHA for 18383e9
src/background/main.js
@@ -17,6 +17,7 @@ import {
17
processAppUse,
18
setAppVersion,
19
getStartupState,
20
+ getNetRequestRuleIds,
21
isContextMenuSupported,
22
checkSearchEngineAccess,
23
getEngineMenuIcon,
@@ -52,10 +53,13 @@ const queue = new Queue({concurrency: 1});
52
53
54
async function setUserAgentHeader(tabId, userAgent) {
55
if (mv3) {
56
+ const ruleIds = getNetRequestRuleIds();
57
+
58
await browser.declarativeNetRequest.updateSessionRules({
59
+ removeRuleIds: ruleIds,
60
addRules: [
61
{
- id: tabId,
62
+ id: ruleIds[0],
63
action: {
64
type: 'modifyHeaders',
65
requestHeaders: [
0 commit comments