User:😂/vector.js

/* Add a random button to Special:Code */ addOnloadHook( function {	var script = document.createElement('script');	script.src = 'http://toolserver.org/~bryan/cgi-bin/random_code_rev';	document.body.appendChild(script); } ); function setRandomCodeRev(rev) { if (!document.forms[0].path) return; var cell = document.forms[0].path.parentNode; var offset = document.createElement('input'); offset.type = 'hidden'; offset.name = 'offset'; offset.value = rev; var random = document.createElement('button'); random.appendChild(document.createTextNode('Random!')); cell.appendChild(random); random.onclick = function { cell.appendChild(offset); document.forms[0].title.value = 'Special:Code/MediaWiki/status/new'; document.forms[0].submit; } }