Skip to content

Commit 5a22dbf

Browse files
committed
Fix missing page action (popup icon) on page reload
Related to #25.
1 parent 4ed9487 commit 5a22dbf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/browser/extension/background/contextMenus.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ chrome.commands.getAll(commands => {
1717
});
1818

1919
export default function createMenu(forUrl, tabId) {
20-
if (typeof tabId !== 'number' || tabId === pageTab) return;
20+
if (typeof tabId !== 'number') return; // It is an extension's background page
21+
chrome.pageAction.show(tabId);
22+
if (tabId === pageTab) return;
2123

2224
let url = forUrl;
2325
let hash = forUrl.indexOf('#');
@@ -35,6 +37,4 @@ export default function createMenu(forUrl, tabId) {
3537
onclick: () => { openDevToolsWindow(id); }
3638
});
3739
});
38-
39-
chrome.pageAction.show(tabId);
4040
}

0 commit comments

Comments
 (0)