Last active
July 19, 2025 22:23
-
-
Save smasongarrison/cf44eb29a3c862ffccfbec1b97e9e114 to your computer and use it in GitHub Desktop.
Auto-fills Cat-a-lot edit summary on category-related pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Wikipedia Classic Edit Summary Autofill | |
// @namespace user-custom | |
// @version 1.0 | |
// @description Auto-fills Cat-a-lot edit summary on category-related pages | |
// @match https://en.wikipedia.org/wiki/Category:* | |
// @match https://en.wikipedia.org/w/index.php?search=* | |
// @match https://en.wikipedia.org/w/index.php?title=Category: | |
// @downloadURL https://gist.githubusercontent.com/smasongarrison/cf44eb29a3c862ffccfbec1b97e9e114/raw/Classic_Edit_Summary_Autofill.js | |
// @updateURL https://gist.githubusercontent.com/smasongarrison/cf44eb29a3c862ffccfbec1b97e9e114/raw/Classic_Edit_Summary_Autofill.js | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const selector = '#cat_a_lot_comment'; | |
const stringToInsert = 'Diffusing per [[WP:DIFFUSE]] and/or [[WP:ALLINCLUDED]]'; | |
setTimeout(() => { | |
const box = document.querySelector(selector); | |
if (box && !box.value.trim()) { | |
box.value = stringToInsert; | |
} | |
}, 1400); // wait 1.4 seconds | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment