Skip to content

Commit

Permalink
add chrome support
Browse files Browse the repository at this point in the history
  • Loading branch information
Piyush Bansal committed Jul 27, 2020
1 parent 72cede1 commit 5733cf1
Show file tree
Hide file tree
Showing 8 changed files with 1,240 additions and 5 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
},
"devDependencies": {
"node-sass": "^4.14.1",
"webextension-polyfill": "^0.6.0",
"webpack-cli": "^3.3.12"
}
}
8 changes: 5 additions & 3 deletions public/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ async function handleMessage(request) {
for (var i = 0; i < length; i++) {
let tab = tabList[i]
try {
await browser.tabs.create({
let response = await browser.tabs.create({
active: false,
discarded: true,
title: tab.title,
// discarded: true,
// title: tab.title,
url: tab.url,
windowId: windowInfo.id,
})
await browser.tabs.discard(response.id)
} catch (err) {
console.log(err)
errors.push(tab)
}
}
Expand Down
Loading

0 comments on commit 5733cf1

Please sign in to comment.