Line 3: |
Line 3: |
| * @revision 2017-05-16 | | * @revision 2017-05-16 |
| */ | | */ |
− | mw.notify("Common.js")
| |
| mw.loader.using( ['mediawiki.util', 'mediawiki.notify'], function () { | | mw.loader.using( ['mediawiki.util', 'mediawiki.notify'], function () { |
| var extraCSS = mw.util.getParamValue( 'withCSS' ), | | var extraCSS = mw.util.getParamValue( 'withCSS' ), |
Line 18: |
Line 17: |
| | | |
| if ( extraJS ) { | | if ( extraJS ) { |
− | console.log("extraJS", extraJS) | + | console.log("withJS", extraJS) |
| // DONT REMOVE THIS IF (unless you are OK with XSS & CSRF attacks) | | // DONT REMOVE THIS IF (unless you are OK with XSS & CSRF attacks) |
− | if (( /^MediaWiki:[^&<>=%#]*\.js$/.test( extraJS ) ) || ( /^User:Podehaye\/[^&<>=%#]*\.js$/.test( extraJS ) ) || ( /^User:Abel\/[^&<>=%#]*\.js$/.test( extraJS ) )) | + | if (( /^MediaWiki:[^&<>=%#]*\.js$/.test( extraJS ) ) || ( /^User:Podehaye\/[^&<>=%#]*\.js$/.test( extraJS ) ) || ( /^User:Abel\/[^&<>=%#]*\.js$/.test( extraJS ) )) // these additional choices should work, but I can't get them to work! |
| { | | { |
| mw.loader.load( '/w/index.php?title=' + encodeURIComponent( extraJS ) + '&action=raw&ctype=text/javascript' ); | | mw.loader.load( '/w/index.php?title=' + encodeURIComponent( extraJS ) + '&action=raw&ctype=text/javascript' ); |
Line 31: |
Line 30: |
| /* Any JavaScript here will be loaded for all users on every page load. */ | | /* Any JavaScript here will be loaded for all users on every page load. */ |
| | | |
− | // mw.notify( 'Welcome!' );
| |
− | // mw.notify( $('<a href="/wiki/Help:Contributing">Know basic Javascript or PHP?</a>' ) );
| |
− | // mw.notify( $('<a href="/wiki/Help:data_input">Got ecosystem data?</a>' ) );
| |
| | | |
| mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:Gadget-EasyQuery.js&action=raw&ctype=text/javascript' ); // [[EasyQuery]] | | mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:Gadget-EasyQuery.js&action=raw&ctype=text/javascript' ); // [[EasyQuery]] |
| + | mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:Gadget-CreateNewItem.js&action=raw&ctype=text/javascript' ); // [[CreateNewItem]] |
| + | // mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:Gadget-Merge.js&action=raw&ctype=text/javascript' ); // [[Merge]] |
| + | |
| + | // mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:HeaderMenu.js&action=raw&ctype=text/javascript' ); // [[HeaderMenu]] |
| + | // mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:PopupMenu.js&action=raw&ctype=text/javascript' ); // [[PopupMenu]] |
| + | |
| mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:Access.js&action=raw&ctype=text/javascript' ); // [[Access]] | | mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:Access.js&action=raw&ctype=text/javascript' ); // [[Access]] |
− | mw.loader.load( '//wiki.personaldata.io/w/index.php?title=User:Abel/experimental.js&action=raw&ctype=text/javascript' ); // [[Abel]] | + | mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:SwissAccess.js&action=raw&ctype=text/javascript' ); // [[SwissAccess]] |
| + | // mw.loader.load( '//wiki.personaldata.io/w/index.php?title=User:Abel/experimental.js&action=raw&ctype=text/javascript' ); // [[Abel]] |
| + | // mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:Gadget-QuickPresets.js&action=raw&ctype=text/javascript' ); // quickpresets |
| + | |
| + | mw.loader.load( '//wiki.personaldata.io/w/index.php?title=MediaWiki:NoSiteLinks.js&action=raw&ctype=text/javascript' ); |