User:King Dragonhoff/global.js

AjaxDiff = { expiry: "6 months", reason: "Vandalism" }; QuickThreads = { message: "Inappropriate", 'notify-admin': false }; QuickCommentsdeletereason = "Spam"; QuickCommentsreason = "Inappropriate behavior"; QuickCommentsduration = "2 weeks"; nullEditDelay = 500; massProtectDelay = 500; massCategorizationDelay = 500; importArticles({   type: 'script',    articles: [        'u:dev:AjaxDiff/code.js',        'u:dev:PurgeButton/code.js',        'u:dev:QuickThreads/code.js',        'u:dev:QuickComments/code.js',        'u:dev:MediaWiki:WHAM/code.2.js',        'u:dev:MassNullEdit/code.js',        'u:dev:MediaWiki:MassProtect/code.js',        'u:dev:MediaWiki:MassCategorization/code.js'    ] });

// Random Thread Reply Picker Button (function {	if (document.querySelector("#Wall.Thread")) {		var toolbar = document.getElementById("WikiaBar").querySelector("ul.tools");		var toolbarButtonsCount = toolbar.querySelectorAll("ul.tools > li").length;		var rollButton = document.createElement("a");		rollButton.setAttribute("role", "button");		rollButton.style.cursor = "pointer";		rollButton.title = "Choose a random reply to this thread.";		rollButton.appendChild(document.createTextNode("Random Reply"));		var rollButtonLi = document.createElement("li");		rollButtonLi.appendChild(rollButton);		toolbar.insertBefore(rollButtonLi, toolbar.childNodes[toolbarButtonsCount - 1]);		rollButton.addEventListener("click", function(ev) { ev.preventDefault; var messages = document.querySelectorAll("[data-is-reply]"); var messageCount = messages.length; for (var i = 1; i < messageCount; i++) { messages[i].style.backgroundColor = ""; }			var messageNum = Math.floor(Math.random * (messageCount - 1)) + 1; messages[messageNum].style.backgroundColor = "#ffffb5"; window.location.hash = messageNum.toString; });	} });