From 6f3de6883467bbd739bd9064d874fc8db8defc5b Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 29 Apr 2015 12:19:52 -0700 Subject: [PATCH] Move browserAction call --- js/background.js | 2 -- js/panel_controller.js | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/js/background.js b/js/background.js index 3c2e05fb7b..7df69a7c68 100644 --- a/js/background.js +++ b/js/background.js @@ -65,8 +65,6 @@ }); }); - extension.browserAction(window.openInbox); - // refresh views var views = extension.windows.getViews(); for (var i = 0; i < views.length; ++i) { diff --git a/js/panel_controller.js b/js/panel_controller.js index f02e07a3cb..a4c1ab34a3 100644 --- a/js/panel_controller.js +++ b/js/panel_controller.js @@ -110,7 +110,7 @@ /* Inbox window controller */ var inboxOpened = false; var inboxWindowId = 0; - window.openInbox = function() { + extension.browserAction(function() { if (inboxOpened === false) { inboxOpened = true; extension.windows.open({ @@ -131,7 +131,7 @@ } else if (inboxOpened === true) { extension.windows.focus(inboxWindowId); } - }; + }); // make sure windows are cleaned up on close extension.windows.onClosed(function (windowId) {