File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -560,8 +560,9 @@ const sendRequestHandlers = {
560
560
} ,
561
561
562
562
async initializeFrame ( request , sender ) {
563
- const tabId = sender . tab . id ;
564
- const enabledState = Exclusions . isEnabledForUrl ( request . topFrameUrl ) ;
563
+ // Check whether the extension is enabled for the top frame's URL, rather than the URL of the
564
+ // specific frame that sent this request.
565
+ const enabledState = Exclusions . isEnabledForUrl ( sender . tab . url ) ;
565
566
566
567
const isTopFrame = sender . frameId == 0 ;
567
568
if ( isTopFrame ) {
@@ -588,7 +589,7 @@ const sendRequestHandlers = {
588
589
"32" : "../icons/action_disabled_32.png" ,
589
590
} ,
590
591
} ;
591
- chrome . action . setIcon ( { path : iconSet [ whichIcon ] , tabId : tabId } ) ;
592
+ chrome . action . setIcon ( { path : iconSet [ whichIcon ] , tabId : sender . tab . id } ) ;
592
593
}
593
594
594
595
const response = Object . assign ( {
Original file line number Diff line number Diff line change @@ -409,10 +409,7 @@ globalThis.lastFocusedInput = (function () {
409
409
410
410
// Checks if Vimium should be enabled or not based on the top frame's URL.
411
411
const checkIfEnabledForUrl = async ( ) => {
412
- const response = await chrome . runtime . sendMessage ( {
413
- handler : "initializeFrame" ,
414
- topFrameUrl : window . top . location . toString ( ) ,
415
- } ) ;
412
+ const response = await chrome . runtime . sendMessage ( { handler : "initializeFrame" } ) ;
416
413
417
414
isEnabledForUrl = response . isEnabledForUrl ;
418
415
You can’t perform that action at this time.
0 commit comments