Chrome extension that applies preferred URL settings whenever a GitHub pull request's Changes tab opens.
The extension button opens a small settings panel. All options are off by default, and your choices are saved in Chrome Sync. The extension reapplies your chosen filters after GitHub's internal navigations.
w=1— hide whitespace-only changes;show-viewed-files=false— do not show files already marked as viewed.
Other query parameters, such as diff=split, and URL hashes are retained.
The extension affects only URLs shaped like
https://github.com/<owner>/<repo>/pull/<number>/changes (and the older
/files route).
- Press
von a Changes page to mark the first not-viewed file on screen as viewed. With viewed files hidden, the next file moves up, sovcan be pressed repeatedly while scrolling. - Auto-mark import-only files as viewed (off by default) marks files whose every changed line is an import.
- Auto-mark unchanged renames as viewed (off by default) marks files GitHub labels File renamed without changes.
The extension marks up to one file per second across both options and picks up new diffs as they load. A file unmarked by hand stays unmarked until the page reloads.
- Run
npm run build. - Open
chrome://extensionsin Chrome and enable Developer mode. - Choose Load unpacked and select the project's
dist/folder.
Enable Hide whitespace changes and Hide viewed files, then open a pull request's Changes tab. Its URL should include:
?w=1&show-viewed-files=false
Run the tests with:
npm testnpm run buildThe unpacked distributable is written to dist/. GitHub Actions additionally
uploads this folder for every CI run and builds a ZIP for every v* tag.
Every update to main, including a PR merge, runs the release workflow. Use a
Conventional Commit title when merging a PR. The workflow uses the highest
applicable bump across the incoming commits:
feat!:or aBREAKING CHANGE:footer increments the major version.feat:increments the minor version.fix:, other types, and plain titles increment the patch version.
The workflow sets the version in the build, tags the source commit, attaches the ZIP to a GitHub Release, and submits it to the Chrome Web Store for review. Google's review usually takes a few days.
If the Chrome Web Store step fails after the GitHub Release was created, fix the
cause and re-run the failed job (gh run rerun <run-id> --failed). The job uses
the same version on retry. To run the workflow for the current main manually,
use gh workflow run release.yml --ref main.
The API only updates an existing item, so the very first version is uploaded by
hand in the Developer Dashboard.
Then, in the Google Cloud project chrome-extensions-511619:
- Enable the
Chrome Web Store API
and the
IAM Service Account Credentials API;
the latter is what
google-github-actions/authuses to mint the access token. - Create a service account (
cws-publisher) and download a JSON key for it. - Grant that service account Service Account Token Creator; without it the
auth step fails with
iam.serviceAccounts.getAccessToken denied. New IAM grants can take a few minutes to apply. - Add the service account's email in the Developer Dashboard under Account → Service account.
Repository secrets:
GCP_SA_KEY: the service account's JSON key.CWS_PUBLISHER_ID: the publisher ID, the UUID in Developer Dashboard URLs (devconsole/<publisher-id>/<extension-id>/...).CWS_EXTENSION_ID: the extension's item ID.
See PRIVACY.md. The extension does not collect or transmit personal data.