From 66169787c0f184c1e7e564ab89db55d5b24e96c7 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Mon, 21 Sep 2026 23:47:55 -0500 Subject: gen readme from mkreadme.sh. mv settings and readme to template. make mkconfig.py executable --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++------ mkconfig.py | 6 +++-- mkreadme.sh | 15 +++++++++++ settings.json | 8 ------ template/README.head.md | 11 ++++++++ template/settings.json | 8 ++++++ 6 files changed, 97 insertions(+), 18 deletions(-) mode change 100644 => 100755 mkconfig.py create mode 100755 mkreadme.sh delete mode 100644 settings.json create mode 100644 template/README.head.md create mode 100644 template/settings.json diff --git a/README.md b/README.md index 9d4a842..343b056 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,66 @@ These are my [Violentmoney](https://violentmonkey.github.io/) userscripts for various sites. Violentmonkey is a modern free software replacement for Tampermonkey/Greasemonkey. -# Install from URL -In Violentmonkey, click the `+` button => `Install from URL`, and paste the following: - -`https://git.tjkeller.xyz/userscripts.git/plain/{path to userscript.js}` - -# Install from zip +# Install all from zip A python script `mkconfig.py` is included to generate a `violentmonkey.zip` file that can be imported in `Violentmoney` => `Settings` => `Backup and maintenance` => `Import from zip`. Or drag and drop the zip file anywhere on the Violentmoney interface. -# Install via drag and drop -Drag and drop any userscript anywhere on the Violentmonkey interface to install it. +# Scripts +Click any of the links below (with the extension installed) to install the script: + +## old.reddit.com page cleanup +``` +// @description Remove crap from and unbreak old.reddit.com +// @match https://old.reddit.com/* +// @grant none +// @version 1.1 +``` +: [Add to Violentmonkey](https://git.tjkeller.xyz/userscripts/plain//scripts/old-reddit-page-cleanup.user.js) + +## rateyourmusic.com darkmode compat +``` +// @description Make rateyourmusic compatible with dark-reader extension +// @match https://rateyourmusic.com/* +// @grant GM_addStyle +// @version 1.1 +``` +: [Add to Violentmonkey](https://git.tjkeller.xyz/userscripts/plain//scripts/rateyourmusic-dark-reader-compatibility.user.js) + +## Fill out USPS scheduled pickup +``` +// @description Fill saved formdata to instantly request USPS scheduled pickups +// @match https://tools.usps.com/schedule-pickup-steps.htm* +// @grant GM_getValue +// @grant GM_setValue +// @grant GM_registerMenuCommand +// @version 2.0 +``` +: [Add to Violentmonkey](https://git.tjkeller.xyz/userscripts/plain//scripts/usps-fill-out-scheduled-pickup.user.js) + +## Disable YouTube Miniplayer +``` +// @description Disable YouTube's miniplayer feature by auto closing and not displaying it +// @include *youtube.com* +// @grant GM_addStyle +// @version 1.1 +``` +: [Add to Violentmonkey](https://git.tjkeller.xyz/userscripts/plain//scripts/youtube-disable-mini-player.user.js) + +## Redirect to EmbedTube +``` +// @description Add a button to YouTube videos to redirect to EmbedTube, a minimal embeded YouTube webclient +// @match https://www.youtube.com/watch* +// @grant GM_addStyle +// @version 1.1 +``` +: [Add to Violentmonkey](https://git.tjkeller.xyz/userscripts/plain//scripts/youtube-embedtube-button.user.js) + +## Remove YouTube Home and Shorts +``` +// @description Redirect to subscriptions page automatically and hide shorts +// @include *youtube.com* +// @grant GM_addStyle +// @version 1.1 +``` +: [Add to Violentmonkey](https://git.tjkeller.xyz/userscripts/plain//scripts/youtube-remove-home-shorts.user.js) diff --git a/mkconfig.py b/mkconfig.py old mode 100644 new mode 100755 index ad04413..e81d0b9 --- a/mkconfig.py +++ b/mkconfig.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import json import os import glob @@ -5,8 +7,8 @@ import zipfile # handle settings settings = {} -if os.path.isfile("settings.json"): - with open("settings.json", 'r') as f: +if os.path.isfile("template/settings.json"): + with open("template/settings.json", 'r') as f: settings = json.load(f) # get all userscripts diff --git a/mkreadme.sh b/mkreadme.sh new file mode 100755 index 0000000..05daae8 --- /dev/null +++ b/mkreadme.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +basedir="https://git.tjkeller.xyz/userscripts/plain/" + +cp -f template/README.head.md README.md + +for script in */*.user.js; do + echo + printf "## " + sed -En "s|//\s*@name\s+||p" "$script" + echo '```' + grep -E "^//\s*@(description|include|match|version|grant)\s" "$script" + echo '```' + echo ": [Add to Violentmonkey]($basedir/$script)" +done >> README.md diff --git a/settings.json b/settings.json deleted file mode 100644 index 7fc6664..0000000 --- a/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "editor": { - "indentWithTabs": true - }, - "valueEditor": { - "indentWithTabs": true - } -} diff --git a/template/README.head.md b/template/README.head.md new file mode 100644 index 0000000..26a63c3 --- /dev/null +++ b/template/README.head.md @@ -0,0 +1,11 @@ +# Userscripts +These are my [Violentmoney](https://violentmonkey.github.io/) userscripts for various sites. +Violentmonkey is a modern free software replacement for Tampermonkey/Greasemonkey. + +# Install all from zip +A python script `mkconfig.py` is included to generate a `violentmonkey.zip` file that can be imported in +`Violentmoney` => `Settings` => `Backup and maintenance` => `Import from zip`. +Or drag and drop the zip file anywhere on the Violentmoney interface. + +# Scripts +Click any of the links below (with the extension installed) to install the script: diff --git a/template/settings.json b/template/settings.json new file mode 100644 index 0000000..7fc6664 --- /dev/null +++ b/template/settings.json @@ -0,0 +1,8 @@ +{ + "editor": { + "indentWithTabs": true + }, + "valueEditor": { + "indentWithTabs": true + } +} -- cgit v1.3.1