Maintain multiple Tampermonkey userscripts in the tampermonkey-scripts repository.
Tweaks for X/Twitter:
- Fold the left column to a Chat-style icon rail by default and provide a left-column expand/collapse button.
- Keep the right column visible by default and provide a matching toggle button in X's floating dock.
- Hide the "Live on X" chip on post detail pages.
- Hide the bookmarks empty-state block on
https://x.com/i/bookmarks.
Install URL:
https://raw.githubusercontent.com/felixlark/tampermonkey-scripts/main/dist/x-tweaks.user.js
Tweaks for GitLab:
- Redirect the projects dropdown to
/dashboard/projects?sort=name_asc. - Rewrite board and issue header links to stable
/-/issues?key=1URLs. - Collapse contextual right sidebars that waste horizontal space.
Install URL:
https://raw.githubusercontent.com/felixlark/tampermonkey-scripts/main/dist/gitlab-tweaks.user.js
src/scripts/<script-id>/index.js Source for each userscript
dist/<script-id>.user.js Built Tampermonkey artifact committed to git
test/<script-id>.test.mjs Script-specific validation
tampermonkey.config.mjs Manifest for metadata, URLs, and build targets
- Add a new source entry under
src/scripts/<script-id>/index.js. - Add its metadata to
tampermonkey.config.mjs. - Add validation in
test/<script-id>.test.mjsand wire it intoscripts/validate.mjs. - Run
npm run validatesodist/*.user.jsis regenerated before committing.
Install scripts from the raw GitHub URLs in dist/, not from local files.
Tampermonkey uses the embedded @updateURL, @downloadURL, and @version metadata. When main changes and the matching dist/*.user.js file is rebuilt and pushed, Tampermonkey can pick up the new version automatically if update checks are enabled.
Important: Tampermonkey only updates when @version increases. This repo currently uses package.json as the shared version source for the managed scripts.
To publish x-tweaks, push to GitHub, and trigger a Tampermonkey update in the real Chrome Default profile:
npm run release:x-tweaksThis command will:
- bump the patch version in
package.json - run
npm run validate - create a release commit
- push
main - wait for the GitHub raw userscript to expose the new
@version - open the raw userscript in Chrome
Defaultso Tampermonkey can install it - verify the installed version from Tampermonkey storage
If you only want to prepare a Tampermonkey-visible update without pushing:
npm run release:patchTo trigger the current x-tweaks update in a specific Chrome profile and verify that Tampermonkey picked it up:
node scripts/trigger-chrome-update.mjs --profile Default --wait-version 0.3.6To inspect the currently installed X Tweaks version in a specific Chrome profile:
node scripts/check-installed-version.mjs --profile DefaultThe npm run chrome:check-installed shortcut still defaults to Default.
For the managed Chrome for Testing runtime used by chrome-use, point the scripts at the managed user-data dir instead of the regular ~/Library/Application Support/Google/Chrome root:
node scripts/check-installed-version.mjs \
--profile Default \
--chrome-root "$HOME/.chrome-use/browser-data/stable"
node scripts/trigger-chrome-update.mjs \
--profile Default \
--chrome-root "$HOME/.chrome-use/browser-data/stable"When --chrome-root points at ~/.chrome-use/browser-data/..., the helper auto-detects the installed Chrome for Testing binary under ~/.chrome-use/browsers/chrome-for-testing/.
One-time prerequisite for Chrome MV3: open Tampermonkey's extension details page and enable Allow User Scripts. Without that toggle, Tampermonkey can store the script but Chrome will not inject it into matching pages.
Install dependencies:
npm installBuild all userscripts:
npm run buildRun validation:
npm run validateOpen the local debug harness:
open /Users/longbiao/Projects/tampermonkey-scripts/debug/index.html