User:Pyrospirit/autoupdate.js

// This script should cause all scripts below it to automatically update without requiring refreshing the monobook.js page. // No idea if it works, though.

function importScript(pag ) { if(importedScripts[page]) { return; }   importedScripts[page] = true; var randomID = Math.floor(Math.random * 100); var url = wgScriptPath + '/index.php?title=' + encodeURIComponent(page.replace(/ /g, '_')) + '&action=raw&ctype=text/javascript' + '&randomimport=' + randomID; var scriptElem = document.createElement('script'); scriptElem.setAttribute('src', url); scriptElem.setAttribute('type', 'text/javascript'); document.getElementsByTagName('head')[0].appendChild(scriptElem); }