User:RainCity471/Scripts/StubGnome/core.js

// /*		importScript("User:RainCity471/Scripts/StubGnome/core.js"); (function{ if(typeof toLowerCase === 'undefined') return;
 * ======================================== StubGnome =================================================
 * To use this script, add
 * To use this script, add
 * To use this script, add
 * to your common.js page. Go to Special:mypage/common.js to get to it.
 * This script is *not* compatible with WP:wikEd. If you use wikEd, disable it by clicking the wikEd button (next to logout) before running StubGnome.
 * This script is *not* compatible with WP:wikEd. If you use wikEd, disable it by clicking the wikEd button (next to logout) before running StubGnome.

$(mw.util.addPortletLink("p-tb", mw.config.get('wgServer') + mw.config.get('wgScript') + "?title=" + wgTitle + "&action=edit&stubgnome=true", "Stub maintenance tools"));

if (window.location = /(.*)stubgnome=true(.*)/) { sgRun } else { return; }

function sgRun { oldStubTl = prompt("Enter stub template to remove:"); oldStubTl = ""; newStubTl = prompt("Stub template to add:"); newStubTl = ""; if (toLowerCase(oldStubTl) = "stub") { var typeOfStubTl = "generic" } else { var typeOfStubTl = prompt("Enter a short description of the stub template. This information will be used in the automatically generated edit summary.") } editSummary = "replacing " + typeOfStubTl + " " + " with " + "; you can help!";

document.getElementById("wpTextbox1").value = document.getElementById("wpTextbox1").value.replace(oldStubTl, newStubTl); document.getElementById("wpSummary").value = editSummary; document.getElementById("wpMinoredit").checked = true; }

}) //