diff --git a/.changeset/odd-onions-brush.md b/.changeset/odd-onions-brush.md
new file mode 100644
index 0000000000..a0996ee8c8
--- /dev/null
+++ b/.changeset/odd-onions-brush.md
@@ -0,0 +1,5 @@
+---
+"@rrweb/web-extension": patch
+---
+
+fix: remove the permission not needed and update the player style link
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f870937fd3..5ba49c811b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -33,7 +33,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- # - name: Send a Slack notification if a publish happens
- # if: steps.changesets.outputs.published == 'true'
- # # You can do something when a publish happens.
- # run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"
+ - name: Build Chrome Extension
+ if: steps.changesets.outputs.published == 'true'
+ run: NODE_OPTIONS='--max-old-space-size=4096' DISABLE_WORKER_INLINING=true yarn turbo run prepublish --filter=@rrweb/web-extension
+
+ - name: Publish Chrome Extension
+ uses: mnao305/chrome-extension-upload@v5.0.0
+ if: steps.changesets.outputs.published == 'true'
+ with:
+ extension-id: 'pdaldeopoccdhlkabbkcjmecmmoninhe'
+ file-path: ./packages/web-extension/dist/chrome.zip
+ client-id: ${{ secrets.CWS_CLIENT_ID }}
+ client-secret: ${{ secrets.CWS_CLIENT_SECRET }}
+ refresh-token: ${{ secrets.CWS_REFRESH_TOKEN }}
+ publish: true
diff --git a/packages/rrweb-player/package.json b/packages/rrweb-player/package.json
index ae90af35ea..e9e7614bea 100644
--- a/packages/rrweb-player/package.json
+++ b/packages/rrweb-player/package.json
@@ -14,7 +14,7 @@
"svelte": "^4.2.14",
"svelte-check": "^3.4.3",
"svelte-preprocess": "^5.0.3",
- "svelte2tsx": "^0.7.6",
+ "svelte2tsx": "^0.7.30",
"tslib": "^2.0.0",
"vite": "^5.3.1"
},
diff --git a/packages/web-extension/package.json b/packages/web-extension/package.json
index bb44441072..f9f340a53c 100644
--- a/packages/web-extension/package.json
+++ b/packages/web-extension/package.json
@@ -19,9 +19,12 @@
},
"devDependencies": {
"@rrweb/types": "^2.0.0-alpha.18",
+ "@types/chrome": "^0.0.287",
"@types/react-dom": "^18.0.6",
+ "@types/semver": "^7.5.8",
"@types/webextension-polyfill": "^0.9.1",
"@vitejs/plugin-react": "^4.2.1",
+ "semver": "^7.6.3",
"type-fest": "^2.19.0",
"vite": "^5.3.1",
"vite-plugin-web-extension": "^4.1.3",
diff --git a/packages/web-extension/src/content/index.ts b/packages/web-extension/src/content/index.ts
index 51899c5dca..0fb866c1e5 100644
--- a/packages/web-extension/src/content/index.ts
+++ b/packages/web-extension/src/content/index.ts
@@ -1,4 +1,4 @@
-import Browser, { type Storage } from 'webextension-polyfill';
+import Browser from 'webextension-polyfill';
import { nanoid } from 'nanoid';
import type { eventWithTime } from '@rrweb/types';
import {
@@ -166,9 +166,7 @@ async function initMainPage() {
async function initCrossOriginIframe() {
Browser.storage.local.onChanged.addListener((change) => {
if (change[LocalDataKey.recorderStatus]) {
- const statusChange = change[
- LocalDataKey.recorderStatus
- ] as Storage.StorageChange;
+ const statusChange = change[LocalDataKey.recorderStatus];
const newStatus =
statusChange.newValue as LocalData[LocalDataKey.recorderStatus];
if (newStatus.status === RecorderStatus.RECORDING) startRecord();
diff --git a/packages/web-extension/src/manifest.json b/packages/web-extension/src/manifest.json
index 482335d4c6..cdf9d3c443 100644
--- a/packages/web-extension/src/manifest.json
+++ b/packages/web-extension/src/manifest.json
@@ -14,7 +14,7 @@
"48": "icon48.png",
"128": "icon128.png"
},
- "permissions": ["activeTab", "tabs", "storage", "unlimitedStorage"]
+ "permissions": ["activeTab", "storage", "unlimitedStorage"]
},
"v2": {
"common": {
diff --git a/packages/web-extension/src/pages/Player.tsx b/packages/web-extension/src/pages/Player.tsx
index df0bf0aadf..56f3fa4d00 100644
--- a/packages/web-extension/src/pages/Player.tsx
+++ b/packages/web-extension/src/pages/Player.tsx
@@ -1,3 +1,4 @@
+///