Files
dasemuandClaude Sonnet 5 7285c82fb7 chore: bootstrap Claude setup
Add root CLAUDE.md, docs/, LESSONS.md, .env.example, .claude/settings.json
hooks (syntax-check on edit and on stop), and CI workflows (lint via
node --check, and a VERSION-based semver bump) for this plain-JS,
no-build Chrome extension.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-18 11:42:15 +02:00

2.2 KiB

CLAUDE.md

Overview

Bypass Paywalls Clean (BPC) — a Manifest V3 Chrome/Chromium extension that bypasses paywalls on supported news sites. This is a tracked fork/mirror of the upstream GitFlic project (magnolia1234/bypass-paywalls-chrome-clean); changes here are mostly periodic syncs from upstream plus local tweaks.

Commands

Plain vanilla JS extension: no package.json, no bundler, no build step.

  • Syntax check: find . -name "*.js" -not -path "./.git/*" -print0 | xargs -0 -n1 node --check
  • No test suite and no linter are configured in this repo.
  • Load locally: chrome://extensions → Developer Mode → Load unpacked → select this folder.

Architecture

  • manifest.json — MV3 manifest (permissions, content scripts, service worker).
  • background.js — service worker: request/header rewriting, site-rule dispatch.
  • contentScript.js, contentScript_once.js, contentScript_once_var.js — injected page scripts.
  • sites.js / sites_updated.json — per-site bypass rules (the bulk of upstream updates).
  • options/ — popup and options UI (HTML/CSS/JS).
  • custom/ — user-defined custom site manifest/rules.
  • lib/ — vendored third-party JS (e.g. purify.min.js).
  • See docs/ for anything not obvious from the code.

Conventions

  • Keep edits minimal and localized; sites.js/README.md mirror upstream content — avoid reformatting them so future upstream merges stay low-conflict.
  • No build step: files run as-is in the browser, so keep syntax ES-compatible with minimum_chrome_version in manifest.json.

Workflow quirks

  • manifest.json's version field tracks the upstream extension release (4-part, e.g. 4.2.8.2) and is NOT the repo's own semver — do not bump it by hand or via CI. This repo's own release tracking uses the root VERSION file instead.
  • README.md / README.html are upstream-authored docs (site list, install steps); prefer syncing them from upstream over hand-editing.

Deployment

Not a deployed service — distributed as an unpacked folder or a .crx file. No web-deploy setup applies.

Gotchas

  • No .env / secrets: this is a client-side browser extension with no backend.
  • node --check only validates syntax, not behavior — there is no real test coverage.