Skip to content

Instantly share code, notes, and snippets.

View LenAnderson's full-sized avatar

Len LenAnderson

View GitHub Profile
// ==UserScript==
// @name SillyTavern - WI Next Content Shortcut
// @namespace http://tampermonkey.net/
// @version 2024-04-06
// @description try to take over the world!
// @author LenAnderson
// @match http://localhost:8000
// @grant none
// ==/UserScript==
@LenAnderson
LenAnderson / SillyTavern-ExpandALLTheEditors.user.js
Created April 2, 2024 15:49
SillyTavern - Expand ALL The Editors
// ==UserScript==
// @name SillyTavern - Expand ALL The Editors
// @namespace http://tampermonkey.net/
// @version 2024-04-02
// @description CTRL+ALT+Click into any textarea to maximize
// @author LenAnderson
// @match http://localhost:8000/
// @icon https://www.google.com/s2/favicons?sz=64&domain=undefined.localhost
// @grant none
// ==/UserScript==
@LenAnderson
LenAnderson / byof.user.js
Last active January 9, 2024 13:06
Bring Your Own Favicon
// ==UserScript==
// @name Bring Your Own Favicon
// @namespace https://github.com/LenAnderson
// @version 1.0.0
// @description Use your own favicon
// @author LenAnderson
// @match *://*/*
// @grant GM_registerMenuCommand
// @grant GM_getValue
// @grant GM_setValue
@LenAnderson
LenAnderson / SillyTavern-ChangeMessageName.user.js
Last active December 21, 2023 16:01
SillyTavern - Quickly Change Message Names
// ==UserScript==
// @name SillyTavern - Change Message Name
// @namespace https://github.com/LenAnderson
// @version 0.2
// @description Quickly edit message names
// @author You
// @match http://localhost:8000/
// @grant none
// ==/UserScript==
@LenAnderson
LenAnderson / SillyTavern-VideoBg.user.js
Last active November 25, 2023 21:43
SillyTavern - Video Backgrounds
// ==UserScript==
// @name SillyTavern - VideoBg
// @namespace https://github.com/LenAdnerson
// @version 0.1
// @description Video Backgrounds for SillyTavern
// @author LenAnderson
// @match http://localhost:8000/
// @grant none
// ==/UserScript==
@LenAnderson
LenAnderson / merge_fo4_bodyslide_presets.py
Created April 26, 2023 12:44
Merge two BodySlide presets for Fallout 4 by adding both values for each slider.
import os
import re
fsm_path = r'E:\Games\Steam\SteamApps\common\Fallout 4\Data\Tools\BodySlide\SliderPresets\FSM Fit Body Bigger Boobs - Nude.xml'
pipa_path = r'E:\Games\Steam\SteamApps\common\Fallout 4\Data\Tools\BodySlide\SliderPresets\PIPA 2 body.xml'
sliders_path = r'E:\Games\Steam\SteamApps\common\Fallout 4\Data\Tools\BodySlide\SliderCategories\CBBE.xml'
with open(fsm_path, 'r') as f:
fsm = [x.strip() for x in f.readlines() if x.strip().startswith('<SetSlider')]
@LenAnderson
LenAnderson / wiztree_csv_merge.py
Created April 14, 2023 07:45
simple python script to merge multiple CSV exports from WizTree into a single file that can be loaded back into WizTree
import os
def main():
"""
- Save this file somewhere.
- In the directory where this file is saved, create a directory named "in".
- Put all your CSV exports from WizTree into the "in" directory.
// ==UserScript==
// @name YouTube - Download Your Thumbnails
// @namespace https://github.com/LenAnderson/
// @version 1.0
// @author LenAnderson
// @match https://studio.youtube.com/channel/*/videos/upload?*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant GM_download
// @connect img.youtube.com
// @run-at context-menu
// ==UserScript==
// @name Reddit - Header Image
// @namespace http://tampermonkey.net/
// @version 0.2
// @description try to take over the world!
// @author You
// @match https://www.reddit.com/r/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
// @connect old.reddit.com
// @connect b.thumbs.redditmedia.com
(async()=>{
const wait = async(ms)=>new Promise(resolve=>setTimeout(resolve, ms));
let btn = document.querySelector('ytd-playlist-video-renderer button[aria-label="Action menu"]');
while (btn) {
btn.click();
await wait(100);
Array.from(document.querySelectorAll('ytd-menu-service-item-renderer')).filter(it=>it.textContent.trim() == 'Remove from Watch later').forEach(it=>it.click());
btn = document.querySelector('ytd-playlist-video-renderer button[aria-label="Action menu"]');
}
})();