Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #195 from brave/8811-chrome-tabs-query
Browse files Browse the repository at this point in the history
skip over master brave window when querying brave/browser-laptop#8811
  • Loading branch information
bridiver authored Jun 7, 2017
2 parents 165523b + ede6ea5 commit df9ab60
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/browser/api/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ const tabsQuery = function (queryInfo = {}, useCurrentWindowId = false) {

var result = []
tabIds.forEach((tabId) => {
// never add the master Brave container window
if (tabValues[tabId].url.startsWith('chrome://brave')) {
return
}

// delete tab from the list if any key doesn't match
if (!queryKeys.map((queryKey) => (tabValues[tabId][queryKey] === queryInfo[queryKey])).includes(false)) {
result.push(tabValues[tabId])
Expand Down

0 comments on commit df9ab60

Please sign in to comment.