Skip to content

Commit 32f4a88

Browse files
committed
Stop using deprecated tabs.getSelected; switch to tabs.query
1 parent b12ed93 commit 32f4a88

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

background_scripts/main.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ do showUpgradeMessage = ->
467467
Settings.set "previousVersion", currentVersion
468468
chrome.notifications.onClicked.addListener (id) ->
469469
if id == notificationId
470-
chrome.tabs.getSelected null, (tab) ->
470+
chrome.tabs.query { active: true, currentWindow: true }, ([tab]) ->
471471
TabOperations.openUrlInNewTab {tab, tabId: tab.id, url: "https://github.com/philc/vimium#release-notes"}
472472
else
473473
# We need to wait for the user to accept the "notifications" permission.

pages/options.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ initOptionsPage = ->
265265
maintainLinkHintsView()
266266

267267
initPopupPage = ->
268-
chrome.tabs.getSelected null, (tab) ->
268+
chrome.tabs.query { active: true, currentWindow: true }, ([tab]) ->
269269
exclusions = null
270270
document.getElementById("optionsLink").setAttribute "href", chrome.runtime.getURL("pages/options.html")
271271

0 commit comments

Comments
 (0)