File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
- import { browserAction , webNavigation , type Tabs , tabs } from 'webextension-polyfill' ;
1
+ import { browserAction , /* webNavigation,*/ type Tabs , tabs } from 'webextension-polyfill' ;
2
2
import { getHostname , invertHostState } from './utils/storage' ;
3
- import { matcher as mapsUrlMatcher , runtimeMapUrl } from './bg' ;
3
+ // import { matcher as mapsUrlMatcher, runtimeMapUrl } from './bg';
4
4
5
- const replacedUrlMatcher = new RegExp ( `^${ runtimeMapUrl } \?` ) ;
5
+ // const replacedUrlMatcher = new RegExp(`^${runtimeMapUrl}\?`);
6
6
7
7
/**
8
8
* Async function to react to clicks on the browser action icon.
@@ -18,15 +18,16 @@ async function actionClick(tab: Tabs.Tab): Promise<void> {
18
18
let hostname = getHostname ( tab . url ) ;
19
19
await invertHostState ( hostname ) ;
20
20
21
+ /*
21
22
let frames = (await webNavigation.getAllFrames({ tabId: tab.id })) ?? [];
22
23
23
24
if (
24
25
frames.some((frame) => {
25
26
frame.url.match(replacedUrlMatcher) || frame.url.match(mapsUrlMatcher);
26
27
})
27
- ) {
28
- tabs . reload ( tab . id , { bypassCache : true } ) ;
29
- }
28
+ )
29
+ */
30
+ tabs . reload ( tab . id , { bypassCache : true } ) ;
30
31
}
31
32
32
33
browserAction . onClicked . addListener ( actionClick ) ;
You can’t perform that action at this time.
0 commit comments