diff --git a/background.js b/background.js index f7889cc..41f3da8 100644 --- a/background.js +++ b/background.js @@ -109,10 +109,14 @@ chrome.tabs.onCreated.addListener(function(currentTab){ }); -chrome.tabs.onUpdated.addListener(function(tabId,changeInfo,currentTab){ - var tab = findTabById(currentTab.windowId, tabId); - tab.window.tabs[tab.index] = currentTab; - saveWindows(); +chrome.tabs.onUpdated.addListener(function(tabId,changeInfo,resultingTab){ + var tab = findTabById(resultingTab.windowId, tabId); + // tab.window.tabs[tab.index] = resultingTab; //Old method that worked, but was weird on some pages such a gist + chrome.tabs.get(tabId,function(currentTab){ + console.log(currentTab); + tab.window.tabs[tab.index] = currentTab; + saveWindows(); + }); }); chrome.tabs.onMoved.addListener(function(tabId,objects){