Skip to content

Commit

Permalink
✨ feat: Make PIP off when updated from 0.0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
khk4912 committed Apr 3, 2024
1 parent bc46107 commit 9db0fed
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
6 changes: 5 additions & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Chzzk-PIP",
"version": "0.0.26",
"version": "0.0.27",
"description": "치지직 PIP, 녹화, 스크린샷 확장 프로그램",
"manifest_version": 3,
"action": {
Expand All @@ -17,6 +17,10 @@
"js": ["js/content_script.js"]
}
],
"background": {
"service_worker": "js/service_worker.js",
"type": "module"
},
"permissions": ["storage", "downloads"],
"web_accessible_resources": [
{
Expand Down
13 changes: 13 additions & 0 deletions src/scripts/service_worker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { setOption } from './utils/options/option_handler'

chrome.runtime.onInstalled.addListener((details) => {
const previousVersion = details.previousVersion

if (previousVersion === undefined) {
return
}

if (previousVersion === '0.0.26') {
void setOption('pip', false)
}
})
3 changes: 2 additions & 1 deletion webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const config: Configuration = {
record_result: path.resolve(__dirname, 'src/scripts/record_result.ts'),
popup_script: path.resolve(__dirname, 'src/scripts/popup_script.ts'),
download_vod: path.resolve(__dirname, 'src/scripts/download_vod.ts'),
monkeypatch_core: path.resolve(__dirname, 'src/scripts/monkeypatch_core.ts')
monkeypatch_core: path.resolve(__dirname, 'src/scripts/monkeypatch_core.ts'),
service_worker: path.resolve(__dirname, 'src/scripts/service_worker.ts')
},
output: {
path: path.resolve(__dirname, 'dist/js'),
Expand Down

0 comments on commit 9db0fed

Please sign in to comment.