MediaWiki:Common.js

/* JavaScript hier zal invloed hebben op elke pagina voor elke gebruiker. */ /*

Import module
Description: Includes a raw wiki page as javascript or CSS, used for including user made modules. Maintainers: User:AzaToth importedScripts = {}; // object keeping track of included scripts, so a script ain't included twice function importScript( page ) { if( importedScripts[page] ) { return; }   importedScripts[page] = true; var url = wgScriptPath + '/index.php?title=' + encodeURIComponent( page.replace( ' ', '_' ) ) + '&action=raw&ctype=text/javascript&dontcountme=s'; var scriptElem = document.createElement( 'script' ); scriptElem.setAttribute( 'src', url ); scriptElem.setAttribute( 'type', 'text/javascript' ); document.getElementsByTagName( 'head' )[0].appendChild( scriptElem ); } function importStylesheet( page ) { var sheet = '@import "'             + wgScriptPath              + '/index.php?title='              + encodeURIComponent( page.replace( ' ', '_' ) )              + '&action=raw&ctype=text/css";' var styleElem = document.createElement( 'style' ); styleElem.setAttribute( 'type', 'text/css' ); styleElem.appendChild( document.createTextNode( sheet ) ); document.getElementsByTagName( 'head' )[0].appendChild( styleElem ); } /*

Meerdere sets speciale tekens
Geeft menu in MediaWiki:Edittools waarmee meerdere sets speciale tekens kunnen worden geraadpleegd. Zie ook MediaWiki:Onlyifediting.js if (document.URL.indexOf("action=edit") > 0 || document.URL.indexOf("action=submit") > 0) { document.write(' '); } /*

Autotekst in uploadpagina voor bestanden
Description: Script voor Speciaal:Uploaden Maintainers: commons:User:Yonidebest, commons:User:Dschwen if (wgPageName == 'Speciaal:Uploaden' || wgPageName == 'Special:Upload' || wgPageName == 'Speciaal:Upload') { document.write('<\/script>'); } /* */