diff --git a/lib/environment/background/pageAction.js b/lib/environment/background/pageAction.js index 2a10bb8f3b..2003b865cd 100644 --- a/lib/environment/background/pageAction.js +++ b/lib/environment/background/pageAction.js @@ -3,10 +3,10 @@ import { addListener, sendMessage } from './messaging'; (process.env.BUILD_TARGET === 'firefox' ? chrome.pageAction : chrome.action).onClicked.addListener(tab => { - sendMessage((process.env.BUILD_TARGET === 'firefox' ? 'pageActionClick' : 'actionClick'), undefined, tab.id); + sendMessage('pageActionClick', undefined, tab.id); }); -addListener((process.env.BUILD_TARGET === 'firefox' ? 'pageAction' : 'action'), ({ operation, state }, { tab }) => { +addListener('pageAction', ({ operation, state }, { tab }) => { switch (operation) { case 'show': (process.env.BUILD_TARGET === 'firefox' ? chrome.pageAction : chrome.action).show(tab.id);