diff options
| author | Stephen Blott | 2016-02-20 17:23:48 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-02-20 17:23:48 +0000 |
| commit | f435bb93aaa91228b1cac7c92cc2995bbf88257f (patch) | |
| tree | ae34f39490f1e631dbb015d5a873207b8f91f3dd /background_scripts | |
| parent | 0a6fb464f44bc4db242183ad137e9f80f793ec62 (diff) | |
| parent | 041b441073be2a554af94b23ea16535391cc1f29 (diff) | |
| download | vimium-f435bb93aaa91228b1cac7c92cc2995bbf88257f.tar.bz2 | |
Merge branch 'windows-onFocusChanged'
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/bg_utils.coffee | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/background_scripts/bg_utils.coffee b/background_scripts/bg_utils.coffee index 96c1282a..ca042686 100644 --- a/background_scripts/bg_utils.coffee +++ b/background_scripts/bg_utils.coffee @@ -18,6 +18,11 @@ class TabRecency @deregister removedTabId @register addedTabId + chrome.windows.onFocusChanged.addListener (wnd) => + if wnd != chrome.windows.WINDOW_ID_NONE + chrome.tabs.query {windowId: wnd, active: true}, (tabs) => + @register tabs[0].id if tabs[0] + register: (tabId) -> currentTime = new Date() # Register tabId if it has been visited for at least @timeDelta ms. Tabs which are visited only for a |
