Skip to content

Commit

Permalink
chore: don't prefilter requests
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Apr 27, 2023
1 parent 1fdc79d commit bf1287e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
5 changes: 1 addition & 4 deletions public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
"storage",
"webRequest",
"webRequestBlocking",
"http://*/maps/embed*?*",
"https://*/maps/embed*?*",
"http://*/maps*?*output=embed*",
"https://*/maps*?*output=embed*"
"<all_urls>"
],
"background": {
"page": "bg.html"
Expand Down
9 changes: 1 addition & 8 deletions src/bg/bg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ import { disabledHosts, getHostname } from './utils/storage';
import { updateActiveTabIcon } from './utils/actionIcon';
import { domainEnds } from './utils/domainEnds';

const patterns: string[] = [
'http://*/maps/embed*?*',
'https://*/maps/embed*?*',
'http://*/maps*?*output=embed*',
'https://*/maps*?*output=embed*',
];

const gLocales: string = domainEnds.join('|'); // TODO: collect more locales
export const matcher: RegExp = new RegExp(
// TODO: fix regex to fit more patterns
Expand All @@ -32,7 +25,7 @@ function redirect(req: WebRequest.OnBeforeRequestDetailsType): WebRequest.Blocki
webRequest.onBeforeRequest.addListener(
redirect,
{
urls: patterns,
urls: ['<all_urls>'],
types: ['sub_frame'],
},
['blocking']
Expand Down

0 comments on commit bf1287e

Please sign in to comment.