Last active
March 7, 2024 13:30
-
-
Save jh34ghu43gu/d2e8cf7aa0b55d0ded8efe5bf3b1a875 to your computer and use it in GitHub Desktop.
quick wiki script for crate->case
This file contains 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 Change crates to cases on tfwiki | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-01-01 | |
// @description try to take over the world! | |
// @author You | |
// @match https://wiki.teamfortress.com/w/index.php?title=*&action=edit | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// ==/UserScript== | |
var textbox = document.getElementById("wpTextbox1"); | |
//var editbox = document.getElementById("wpSummary"); | |
if(textbox.innerHTML.includes("{{avail|crate")) { | |
textbox.innerHTML = textbox.innerHTML.replace("{{avail|crate", "{{avail|case"); | |
//editbox.innerHTML = "crate -> case"; | |
document.getElementById("wpMinoredit").checked = true; | |
} else { | |
window.alert("Already links to case"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment