Skip to content

Add UA override for chzzk.naver.com, update manifest/UI, and add CI build workflow#2

Open
emptycan1010 wants to merge 2 commits into
mainfrom
codex/add-functionality-to-change-user-agent
Open

Add UA override for chzzk.naver.com, update manifest/UI, and add CI build workflow#2
emptycan1010 wants to merge 2 commits into
mainfrom
codex/add-functionality-to-change-user-agent

Conversation

@emptycan1010
Copy link
Copy Markdown
Owner

Motivation

  • Some requests to https://chzzk.naver.com/* require a specific User-Agent to behave correctly, so the extension should be able to override the browser User-Agent when accessing that host.
  • The UA override should be configurable by users and persist via existing options infrastructure.
  • Ensure builds and linting run automatically by adding a CI workflow for push and pull request events.

Description

  • Added a boolean option uaChange to src/types/options.ts with a default of true and exposed it in the popup UI by adding a new option checkbox in src/entrypoints/popup/App.tsx.
  • Implemented dynamic declarativeNetRequest rule management in src/entrypoints/background.ts with setChzzkUserAgentRule, and wired syncing on startup/installation and on option changes using chrome.storage.onChanged and getOption.
  • Updated wxt.config.ts to include the declarativeNetRequest permission and host_permissions for https://chzzk.naver.com/* so the rule can be applied.
  • Added a GitHub Actions workflow (.github/workflows/build.yml) that checks out the repo, sets up pnpm and Node.js, installs dependencies, runs pnpm eslint ., and runs pnpm build, and uploads the Chrome build artifact.

Testing

  • A CI job was added to run pnpm install --frozen-lockfile, pnpm eslint ., and pnpm build on push and pull request events, but no CI run results are included in this change.
  • No automated test failures are reported in this rollout; local type-checking and build steps are expected to be covered by the added workflow.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant