aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJez Ng2012-10-24 22:27:15 -0400
committerJez Ng2012-10-29 17:52:29 -0400
commitee971406840bd13a43342a8669ceb062c867194f (patch)
tree543040b32904d44530a6b78d9413db5b2461fe04
parent7b893f5e46678a1713aaa36ff179ff5a24610d2a (diff)
downloadvimium-ee971406840bd13a43342a8669ceb062c867194f.tar.bz2
Don't restore view-source: tabs.
-rw-r--r--background_scripts/main.coffee8
1 files changed, 4 insertions, 4 deletions
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--