Skip to content

Commit bf1287e

Browse files
committed
chore: don't prefilter requests
1 parent 1fdc79d commit bf1287e

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

public/manifest.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@
2020
"storage",
2121
"webRequest",
2222
"webRequestBlocking",
23-
"http://*/maps/embed*?*",
24-
"https://*/maps/embed*?*",
25-
"http://*/maps*?*output=embed*",
26-
"https://*/maps*?*output=embed*"
23+
"<all_urls>"
2724
],
2825
"background": {
2926
"page": "bg.html"

src/bg/bg.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ import { disabledHosts, getHostname } from './utils/storage';
33
import { updateActiveTabIcon } from './utils/actionIcon';
44
import { domainEnds } from './utils/domainEnds';
55

6-
const patterns: string[] = [
7-
'http://*/maps/embed*?*',
8-
'https://*/maps/embed*?*',
9-
'http://*/maps*?*output=embed*',
10-
'https://*/maps*?*output=embed*',
11-
];
12-
136
const gLocales: string = domainEnds.join('|'); // TODO: collect more locales
147
export const matcher: RegExp = new RegExp(
158
// TODO: fix regex to fit more patterns
@@ -32,7 +25,7 @@ function redirect(req: WebRequest.OnBeforeRequestDetailsType): WebRequest.Blocki
3225
webRequest.onBeforeRequest.addListener(
3326
redirect,
3427
{
35-
urls: patterns,
28+
urls: ['<all_urls>'],
3629
types: ['sub_frame'],
3730
},
3831
['blocking']

0 commit comments

Comments
 (0)