User:DannyS712 test/history.js

$(function { var ExpandHistory_config = {	name: 'ExpandHistory.js',	version: 1.0,	debug: true }; mw.loader.using( 'mediawiki.util', function { $(document).ready( function {     	var action = mw.config.get('wgAction');    	if (action && action === 'history'){    		ExpandHistory;    	}    } ); } ); function ExpandHistory{	var links = $('a:textEquals("500")');	var thousand;	console.log( links );	links.each( function { thousand = $(this).clone; thousand[0].href = thousand[0].href.replace(/limit=500/, 'limit=1000'); thousand[0].textContent = '1000'; thousand = thousand[0]; this.after( thousand ); this.after( ' | ' ); }); } // Attribution: copied from https://stackoverflow.com/questions/6673777/select-link-by-text-exact-match# $.expr[':'].textEquals = function(a, i, m) {   return $(a).text.match("^" + m[3] + "$"); }; });