From 3e20811018460d5e4b55ada986e510758f7b9698 Mon Sep 17 00:00:00 2001 From: deanoemcke Date: Fri, 18 Aug 2017 10:24:01 -0400 Subject: [PATCH] Reenable auto reload of suspended tabs that receive focus after the closing of another tab (#519) --- src/js/background.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/js/background.js b/src/js/background.js index 49be92e7..42ed6056 100755 --- a/src/js/background.js +++ b/src/js/background.js @@ -22,7 +22,6 @@ var tgs = (function () { unsuspendOnReloadByTabId = {}, temporaryWhitelistOnReloadByTabId = {}, scrollPosByTabId = {}, - lastTabCloseTimestamp = new Date(), suspensionActiveIcon = '/img/icon19.png', suspensionPausedIcon = '/img/icon19b.png'; @@ -432,13 +431,6 @@ var tgs = (function () { updateIcon(info.status); }); - //check to see if we have just recently removed a tab - //if so, assume this is an 'accidental' tab focus and do not unsuspend - if (lastTabCloseTimestamp > (new Date()) - 500) { - if (debug) console.log('ignoring tab focus'); - return; - } - //pause for a bit before assuming we're on a new tab as some users //will key through intermediate tabs to get to the one they want. (function () { @@ -1031,7 +1023,6 @@ var tgs = (function () { queueSessionTimer(); delete unsuspendOnReloadByTabId[tabId]; delete temporaryWhitelistOnReloadByTabId[tabId]; - lastTabCloseTimestamp = new Date(); }); chrome.webNavigation.onCreatedNavigationTarget.addListener(function (details) { var instantlySuspend = gsUtils.getOption(gsUtils.INSTANT_SUSPEND);