From 4097dbf4c7aed95a99c8e9b875ff985f09c1d613 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 6 Jul 2014 20:57:23 -0400 Subject: [PATCH] oops, need this --- js/tab.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/tab.js b/js/tab.js index 5ad3ff3d8..aedde2bbd 100644 --- a/js/tab.js +++ b/js/tab.js @@ -47,6 +47,14 @@ } chrome.tabs.onUpdated.addListener(onTabUpdated); + function onTabRemoved(tabId) { + if ( tabId < 0 ) { + return; + } + µBlock.unbindTabFromPageStats(tabId); + } + chrome.tabs.onRemoved.addListener(onTabRemoved); + // Initialize internal state with maybe already existing tabs chrome.tabs.query({ url: '' }, function(tabs) { var i = tabs.length;