From ee971406840bd13a43342a8669ceb062c867194f Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Wed, 24 Oct 2012 22:27:15 -0400 Subject: Don't restore view-source: tabs. --- background_scripts/main.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index b56d391c..56e3af07 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -338,10 +338,10 @@ chrome.tabs.onRemoved.addListener((tabId) -> openTabInfo = openTabs[tabId] updatePositionsAndWindowsForAllTabsInWindow(openTabInfo.windowId) - # If we restore chrome:# pages, they'll ignore Vimium keystrokes when they reappear. - # Pretend they never existed and adjust tab indices accordingly. - # Could possibly expand this into a blacklist in the future - if (/^chrome[^:]*:\/\/.*/.test(openTabInfo.url)) + # If we restore pages that content scripts can't run on, they'll ignore Vimium keystrokes when they + # reappear. Pretend they never existed and adjust tab indices accordingly. Could possibly expand this into + # a blacklist in the future. + if (/^(chrome|view-source:)[^:]*:\/\/.*/.test(openTabInfo.url)) for i of tabQueue[openTabInfo.windowId] if (tabQueue[openTabInfo.windowId][i].positionIndex > openTabInfo.positionIndex) tabQueue[openTabInfo.windowId][i].positionIndex-- -- cgit v1.2.3