File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 3737 " <all_urls>"
3838 ],
3939 "permissions" : [
40- " tabs"
40+ " tabs" ,
41+ " webNavigation"
4142 ]
42- }
43+ }
Original file line number Diff line number Diff line change @@ -16,12 +16,16 @@ const cleanupCache = (tabId: number) => {
1616 }
1717} ;
1818
19+ chrome . webNavigation . onCommitted . addListener ( ( { transitionType, tabId } ) => {
20+ if ( transitionType === 'reload' ) {
21+ cleanupCache ( tabId ) ;
22+ }
23+ } ) ;
24+
1925chrome . tabs . onUpdated . addListener ( ( tabId ) => {
20- cleanupCache ( tabId ) ;
2126 addExtensionMessageListener ( ( message ) => {
2227 switch ( message . type ) {
2328 case 'WELCOME' : {
24- enabledTab . add ( tabId ) ;
2529 chrome . action . setIcon ( {
2630 tabId,
2731 path : {
@@ -31,6 +35,7 @@ chrome.tabs.onUpdated.addListener((tabId) => {
3135 128 : 'images/icon128.png' ,
3236 } ,
3337 } ) ;
38+ enabledTab . add ( tabId ) ;
3439 break ;
3540 }
3641 case 'UPDATE' : {
You can’t perform that action at this time.
0 commit comments