diff options
| author | Jez Ng | 2012-10-24 22:27:15 -0400 |
|---|---|---|
| committer | Jez Ng | 2012-10-29 17:52:29 -0400 |
| commit | ee971406840bd13a43342a8669ceb062c867194f (patch) | |
| tree | 543040b32904d44530a6b78d9413db5b2461fe04 | |
| parent | 7b893f5e46678a1713aaa36ff179ff5a24610d2a (diff) | |
| download | vimium-ee971406840bd13a43342a8669ceb062c867194f.tar.bz2 | |
Don't restore view-source: tabs.
| -rw-r--r-- | background_scripts/main.coffee | 8 |
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-- |
