@@ -99,7 +99,7 @@ TabOperations =
99
99
tabConfig =
100
100
url : Utils .convertToUrl request .url
101
101
index : request .tab .index + 1
102
- selected : true
102
+ active : true
103
103
windowId : request .tab .windowId
104
104
openerTabId : request .tab .id
105
105
chrome .tabs .create tabConfig, callback
@@ -127,11 +127,11 @@ toggleMuteTab = do ->
127
127
selectSpecificTab = (request ) ->
128
128
chrome .tabs .get (request .id , (tab ) ->
129
129
chrome .windows .update (tab .windowId , { focused : true })
130
- chrome .tabs .update (request .id , { selected : true }))
130
+ chrome .tabs .update (request .id , { active : true }))
131
131
132
132
moveTab = ({count, tab, registryEntry}) ->
133
133
count = - count if registryEntry .command == " moveTabLeft"
134
- chrome .tabs .getAllInWindow null , (tabs ) ->
134
+ chrome .tabs .query { currentWindow : true } , (tabs ) ->
135
135
pinnedCount = (tabs .filter (tab) -> tab .pinned ).length
136
136
minIndex = if tab .pinned then 0 else pinnedCount
137
137
maxIndex = (if tab .pinned then pinnedCount else tabs .length ) - 1
@@ -226,7 +226,7 @@ removeTabsRelative = (direction, {tab: activeTab}) ->
226
226
# Selects a tab before or after the currently selected tab.
227
227
# - direction: "next", "previous", "first" or "last".
228
228
selectTab = (direction , {count, tab}) ->
229
- chrome .tabs .getAllInWindow null , (tabs ) ->
229
+ chrome .tabs .query { currentWindow : true } , (tabs ) ->
230
230
if 1 < tabs .length
231
231
toSelect =
232
232
switch direction
@@ -238,7 +238,7 @@ selectTab = (direction, {count, tab}) ->
238
238
Math .min tabs .length - 1 , count - 1
239
239
when " last"
240
240
Math .max 0 , tabs .length - count
241
- chrome .tabs .update tabs[toSelect].id , selected : true
241
+ chrome .tabs .update tabs[toSelect].id , active : true
242
242
243
243
chrome .tabs .onUpdated .addListener (tabId, changeInfo, tab) ->
244
244
return unless changeInfo .status == " loading" # Only do this once per URL change.
@@ -467,7 +467,7 @@ do showUpgradeMessage = ->
467
467
Settings .set " previousVersion" , currentVersion
468
468
chrome .notifications .onClicked .addListener (id) ->
469
469
if id == notificationId
470
- chrome .tabs .getSelected null , ( tab ) ->
470
+ chrome .tabs .query { active : true , currentWindow : true }, ([ tab] ) ->
471
471
TabOperations .openUrlInNewTab {tab, tabId : tab .id , url : " https://github.com/philc/vimium#release-notes" }
472
472
else
473
473
# We need to wait for the user to accept the "notifications" permission.
0 commit comments