diff options
| author | mrmr1993 | 2014-08-16 00:38:26 +0100 |
|---|---|---|
| committer | mrmr1993 | 2014-08-16 00:38:26 +0100 |
| commit | 558df1b8b5cac94f90df5f91788f14e572552f40 (patch) | |
| tree | de63803dc4ed588e2834b77b81e9f23087a01e54 | |
| parent | be76291cfdbae4ce142efe2ab35795fff91e12e6 (diff) | |
| download | vimium-558df1b8b5cac94f90df5f91788f14e572552f40.tar.bz2 | |
Update restore tab for upcoming chrome.sessions API
See
[here](https://developer.chrome.com/extensions/sessions#method-restore)
for API details
| -rw-r--r-- | background_scripts/main.coffee | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 3b7670d4..8f94eb04 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -247,9 +247,8 @@ BackgroundCommands = chrome.tabs.remove(tab.id)) restoreTab: (callback) -> # TODO: remove if-else -block when adopted into stable - if chrome.sessionRestore - chrome.sessionRestore.getRecentlyClosed((closed) -> - chrome.sessionRestore.restore(closed[0])) + if chrome.sessions + chrome.sessions.restore(null, (restoredSession) -> callback()) else # TODO(ilya): Should this be getLastFocused instead? chrome.windows.getCurrent((window) -> |
