From 558df1b8b5cac94f90df5f91788f14e572552f40 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Sat, 16 Aug 2014 00:38:26 +0100 Subject: Update restore tab for upcoming chrome.sessions API See [here](https://developer.chrome.com/extensions/sessions#method-restore) for API details --- background_scripts/main.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'background_scripts') 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) -> -- cgit v1.2.3