User:Fredddie/timeless.js

/* Colour matching brackets in a copy of the edit box. User:ais523/bracketmatch.js  */

citeUserDateFormat = ', ';

/* function confirmWatchlistRollback {	if(mw.config.get('wgCanonicalSpecialPageName')=='Watchlist') {		var rollbackNodes; if(!document.getElementsByClassName) {			rollbackNodes=getElementsByClassName(document.getElementById("bodyContent"),"span","mw-rollback-link"); }		else {			rollbackNodes=document.getElementsByClassName('mw-rollback-link'); }		function rollbackclicked(e) {			if(!e) {				var e=window.event; }			if(!confirm("Are you sure you want to rollback this edit?")) {		        	if(e.stopPropagation) {					e.stopPropagation; e.preventDefault; }				else {					e.cancelBubble=true; e.returnValue=false; }			}                 }		for (var i=0;i<rollbackNodes.length;i++) {	             rollbackNodes[i].childNodes[1].onclick=rollbackclicked; }   } } $(confirmWatchlistRollback);
 * Will pop-up a confirmation dialog when rollback link is clicked from Watchlist.
 * Hit the "cancel" button if you had clicked Rollback accidentally and the edit will not be reverted.

/* Admin highlighting */ $.getJSON( mw.config.get('wgScriptPath')+'/index.php?action=raw&ctype=application/json&title=User:Amalthea_(bot)/userhighlighter.js/sysop.js', function(data){		$(function{ function highlightadmins_inner(n,h) //node, relevant hyperlink fragment {			 if (n.nodeType!=1||n.tagName.toLowerCase!="a") return 0; // not an anchor if (n.href.indexOf(mw.config.get('wgScript')+"?title="+h) == -1 &&			     n.href.indexOf(mw.config.get('wgArticlePath').split("$1")[0]+h) == -1) return 0; // to the wrong target var u=n.href.split(h)[1]; if(data[u.split("_").join(" ")]==1) {			   n.style.backgroundColor="#FFDEAD"; if(n.className==null||n.className=="") n.className="amalthea_userhighlighter_sysop"; else n.className+=" amalthea_userhighlighter_sysop"; }			 return 1; }			function highlightadmins(n) //node {			 while(n!=null) {			   if(highlightadmins_inner(n,"User:")) n=n.nextSibling; else if(highlightadmins_inner(n,"User_talk:")) n=n.nextSibling; else if(highlightadmins_inner(n,"Special:Contributions:")) n=n.nextSibling; else {			     if(n.firstChild!=null) highlightadmins(n.firstChild); n=n.nextSibling; }			 }			}			highlightadmins(document.getElementById('bodyContent')); });		}); }(jQuery));
 * (function($){

mw.loader.load('//ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&action=raw&ctype=text/javascript');