Skip to content

Commit 6041862

Browse files
committed
Fix page action icon issue: it not appered again on page reloading
1 parent 9a3e900 commit 6041862

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

extension/background.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ chrome.commands.onCommand.addListener(function(command) {
1111
chrome.runtime.onMessage.addListener(
1212
function(request, sender, sendResponse) {
1313
console.log("Received tab message: ", request);
14-
if(request.command == "activateTab" && sender.tab && activeTabs.indexOf(sender.tab.id) == -1){
15-
activeTabs.push(sender.tab.id);
14+
if(request.command == "activateTab" && sender.tab){
15+
if(activeTabs.indexOf(sender.tab.id) == -1){
16+
activeTabs.push(sender.tab.id);
17+
}
1618
chrome.pageAction.show(sender.tab.id);
1719
chrome.pageAction.setTitle("Key Socket Media Keys: tab control is enabled, click to disable");
1820
}

0 commit comments

Comments
 (0)