Jump to content

User:Technical 13/Scripts/ACCHelp/Abuse log.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
if(mw.config.get("wgCanonicalSpecialPageName") === "AbuseLog"){
	if(typeof($("p:contains(\"No results\")").html()) === "undefined"){
		$("h1#firstHeading").html(tickBad + " " + $("h1#firstHeading").html());/* Disabled
// Disabling for now, want to set it up to only warn if the triggering was in the last month
		alert("\t\tWARNING!\n" + $("input[name=\"wpSearchUser\"]").val() + " has tripped an edit filter!");*/
	} else {
		$("p:contains(\"No results\")").addClass("error");
		$("h1#firstHeading").html(tickGood + " " + $("h1#firstHeading").html());
		document.title = Ucheck + document.title;
	}
}

/* Notepad / TODO:
* Check if the IP/user has blocks
* If blocks, inject lines showing (un)blocks
* Turn the list on this page into an easy to read table.
** Highlight top rows if user not currently blocked and filter triggered less than a week ago in red
** Highlight rows if user not currently blocked and filter triggered betweem a week and a month ago in pink
** Highlight rows if user not currently blocked and filter triggered betweem a month and 3 months ago in light orange
** Highlight rows if user not currently blocked and filter triggered betweem 3 months and 6 months ago in yellow
*/