User:JJPMaster/Scripts/masscat.js: Difference between revisions

Content deleted Content added
fix query string functionality
for global use
 
(4 intermediate revisions by the same user not shown)
Line 1:
var contentContent = document.getElementById("bodyContent");
if (mw.config.get("wgCanonicalNamespace") == "Category" || mw.config.get("wgCanonicalNamespace") == "Category talk") {
mw.util.addPortletLink("p-tb", `/wiki/Special:MassCat?cat=${mw.config.get("wgPageNamewgTitle")};`, "Mass categorizer", "p-masscat", "Mass categorizer");
}
// Adapted from User:Ahecht/Scripts/massmove.js
Line 38:
action: "edit",
title: e,
appendtext: `\n[[Category:${massCatGetCat()}]]`,
summary: "Mass categorization with [[w:en:User:JJPMaster/masscat.js|MassCat]]"
},
api = new mw.Api();
Line 60:
<div id="wpMassCatFailedContainer"></div>
The name of the category:<br/>
<input type="text" id="wpMassCatName" name="wpMassCatName" value="${new URLSearchParams(window.___location.search).get("cat")}"/>
<br /><br />
Pages to add to the category (one on each line, please):<br />