From 0f5cc3b666fa3ce29ce7f029c7eea7cfb0b1bf7a Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Tue, 15 Aug 2017 14:54:21 +0800 Subject: [PATCH] fix #13, not working after restart --- index.js | 6 +++--- manifest.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 5c0baa7..07a7e11 100644 --- a/index.js +++ b/index.js @@ -5,8 +5,8 @@ var activeTab = null; function updateActiveTab() { browser.tabs.query({currentWindow: true, active: true}).then(function(tabs) { browser.tabs.get(tabs[0].id).then(function(tab) { - if (!activeTab) { - initEventHandlers(tab); + if (activeTab === null) { + initEventHandlers(); } activeTab = tab; }); @@ -79,7 +79,7 @@ function makeRight(newTab) { browser.tabs.move(newTab.id, { index: targetIndex }).then(function(t) { // woohoo. }, function(e) { - console.log('AlwaysRight: tab move fail', e); + console.error('AlwaysRight: tab move fail', e); }); }); } diff --git a/manifest.json b/manifest.json index dcddb81..bec9b78 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ }, "manifest_version": 2, "name": "Always Right", - "version": "2.0.4", + "version": "2.0.6", "description": "Firefox add-on that always opens new tabs immediately to the right of the active tab.", "background" : { "scripts": ["index.js"] -- knotmirror 0.0.1