User:IAmaPersonthatExists/global.js

$.getScript("//dev.fandom.com/index.php?title=MediaWiki:DiscussionsBlock.js&action=raw&ctype=text/javascript");

importArticles({   type: 'script',    articles: [    	"u:dev:MediaWiki:Rollback/code.js",    	"u:dev:MediaWiki:Discussions Delete All/code.js",    	"u:dev:MediaWiki:Nuke/code.js",    	'u:dev:MediaWiki:MassEdit/code.js',    	'u:dev:MediaWiki:DiscussionsViewer.js',    ] });

// here is some cursed wikitext parser for Message Walls & Article Comments

const OnMessagesLoad = function {

var Comments = ($("#articleComments")[0] || $(".MessageWallForum")[0]).getElementsByClassName("entity-content");

for (var i = 0; i < Comments.length; i++) {

if(!Comments[i].getElementsByClassName("mw-parser-output")[0]) {

var Url = new URL(" https://site/api.php ".replace("site", mw.config.get("wgServerName")));

Url.search = (new URLSearchParams({

"action": "parse",

"text": encodeUriComponent(Comments[i].innerHTML),

"contentmodel": "wikitext",

"format": "json"

})).toString;

(function {

var Comment = Comments[i];

$.ajax({

async: true,

type: "GET",

url: Url.href,

}).done(function(data) {

Comment.innerHTML = data.parse.text["*"];

});

});

}

}

setTimeout(OnMessagesLoad, 100);

};

const WaitForMessages = function {

if(!(mw.config.get("wgNamespaceNumber") === 1200 || mw.config.get("wgNamespaceNumber") === 0)) return;

if($("#articleComments")[0] || $(".MessageWallForum")[0]) {

if(($("#articleComments")[0] || $(".MessageWallForum")[0]).getElementsByClassName("entity-content")[0]) return OnMessagesLoad;

}

setTimeout(WaitForMessages, 100);

};