From a8a91d63e7cab335040a14a2fe80f23d7c045e0a Mon Sep 17 00:00:00 2001 From: nralbrecht Date: Wed, 23 Nov 2016 21:13:12 +1300 Subject: [PATCH] Fix #5 - Open links with blank target, on the right For some reason, the lastActiveTabId ends up being the same as the newly created tab. --- background-script.js | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/background-script.js b/background-script.js index 0c529bf..e1fb27d 100644 --- a/background-script.js +++ b/background-script.js @@ -25,7 +25,7 @@ chrome.tabs.onActivated.addListener(function(activeInfo) { chrome.tabs.onCreated.addListener(function(tab) { chrome.tabs.get(lastActiveTabId, function(lastActiveTab) { - if (lastActiveTab.pinned) { + if (lastActiveTab.pinned || lastActiveTabId === tab.id) { chrome.tabs.move(tab.id, { index: -1 }, function() { diff --git a/manifest.json b/manifest.json index f3fb0d5..31f1d7c 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Pined Tab Fix", - "version": "2.0.4", + "version": "2.0.5", "description": "__MSG_extensionDescription__", "homepage_url": "https://github.com/nralbrecht/pinned-tab-fix",