Skip to content

CodeTweak is a lightweight, user script manager and editor. Designed to be a modern version of tampermonkey and to support manifest v3 unlike violent monkey.

License

Notifications You must be signed in to change notification settings

MrBlankCoding/CodeTweak

Repository files navigation

CodeTweak

CodeTweak is a Manifest V3 userscript manager with a built-in editor.

What it does

  • Create, edit, enable, and disable userscripts.
  • Run scripts by URL pattern and run timing.
  • Support common GM APIs (GM_getValue, GM_setValue, GM_xmlhttpRequest, etc).
  • Import scripts from Greasy Fork.

Build (Firefox)

npm ci
npm run build:firefox
  • Build script: buildScripts/build-firefox.js
  • Output folder: build/firefox
  • Firefox package: build/codetweak-firefox.zip

Build (Chrome)

npm ci
npm run build:chrome

Output: build/chrome

  • Chrome package: build/codetweak-chrome.zip

Development

npm install
npm run lint
npm run build:chrome
npm run build:firefox

Docs:

npm run docs:dev
npm run docs:build

Project structure

  • src/ extension source
  • buildScripts/ browser build scripts
  • docs-src/ VitePress documentation source

Example userscript

// ==UserScript==
// @name        Demo: mark page ready
// @match       https://example.com/*
// @run-at      document-end
// @grant       GM_setValue
// ==/UserScript==

(async () => {
  document.body.setAttribute("data-codetweak", "ready");
  await GM_setValue("lastRun", Date.now());
})();

License

MIT. See LICENSE.txt.

About

CodeTweak is a lightweight, user script manager and editor. Designed to be a modern version of tampermonkey and to support manifest v3 unlike violent monkey.

Topics

Resources

License

Stars

Watchers

Forks