Skip to content

Commit

Permalink
Improve tab capture detection
Browse files Browse the repository at this point in the history
  • Loading branch information
vantezzen committed Aug 20, 2022
1 parent 452d4c4 commit 8a50d20
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
},
"scripts": {
"dev": "plasmo dev --target=chrome-mv2",
"dev:mv3": "plasmo dev --target=chrome-mv3",
"dev:firefox": "plasmo dev --target=firefox-mv2",
"build": "plasmo build --target=chrome-mv2 --zip",
"build:mv3": "plasmo build --target=chrome-mv3 --zip",
"build:firefox": "plasmo build --target=firefox-mv2 --zip"
},
"dependencies": {
"@parcel/core": "^2.6.1",
"@types/debug": "^4.1.7",
"@types/webextension-polyfill": "^0.9.0",
"@vantezzen/plasmo-state": "1.0.7",
"@vantezzen/plasmo-state": "^1.0.7",
"debug": "^4.3.4",
"fontsource-poppins": "^4.0.0",
"intro.js": "^5.1.0",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

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

3 changes: 2 additions & 1 deletion src/shared/platform.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export const isChromium = navigator.userAgent.includes("Chrome")
export const supportsTabCapture = isChromium
export const supportsTabCapture =
isChromium && process.env.PLASMO_MANIFEST_VERSION === "v2"

0 comments on commit 8a50d20

Please sign in to comment.