MediaWiki:Gadget-adminHighlight.js

// By Equazcion: http://terraria.fandom.com/User:Equazcion

var urlPre = 'https://terraria.fandom.com'; var adminListPage = 'MediaWiki:Gadget-adminHighlight/AdminList.json'; var request1 = { action:"query", prop:"revisions", titles:adminListPage, rvprop:"content", formatversion:"2" } $.getJSON(urlPre + '/api.php?format=json', request1, function(data){	var $json = $.parseJSON(data.query.pages[0].revisions[0].content);	var admins = $json.list.split(",");	$('#mw-content-text a[title]').each(function{ var $this = $(this); var user = $this.attr('title').replace(/User:/, ''); if ($.inArray(user, admins) > -1) { $this.addClass('admin-highlight'); $this.css('background-color', 'rgba(204, 242, 241, 0.5)'); }	}); });