44,445
edits
No edit summary |
(Attempting the Wikipedia approach. I want to fix JS on this wiki once and for all.) |
||
Line 1: | Line 1: | ||
/* 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.loader.using( ['mediawiki.user', 'mediawiki.util', 'mediawiki.notify', 'jquery.client'] ).done( function () { | |||
console.log("Pikipedia JS temporary test, please ignore. Test content: 'checkpoint 1'"); | |||
/* Test if an element has a certain class ************************************** | /* Test if an element has a certain class ************************************** | ||
Line 488: | Line 495: | ||
$( hideable.init ); | $( hideable.init ); | ||
console.log("Pikipedia JS temporary test, please ignore. Test content: 'checkpoint 2'"); | |||
// JavaScript countdown timer 2.0, by Splarka | // JavaScript countdown timer 2.0, by Splarka | ||
Line 663: | Line 672: | ||
/* move game icons into #content for more consistent positioning */ | /* move game icons into #content for more consistent positioning */ | ||
$(function () {$('#game-icons').css('margin-top', '5px').insertBefore($('#firstHeading'))}) | $(function () {$('#game-icons').css('margin-top', '5px').insertBefore($('#firstHeading'))}) | ||
console.log("Pikipedia JS temporary test, please ignore. Test content: 'checkpoint 3'"); | |||
/* Pikan */ | /* Pikan */ | ||
Line 670: | Line 681: | ||
mw.loader.load('//www.pikminwiki.com/index.php?title=User:Espyo/pikan-pikipedia.js' | mw.loader.load('//www.pikminwiki.com/index.php?title=User:Espyo/pikan-pikipedia.js' | ||
+ '&action=raw&ctype=text/javascript'); | + '&action=raw&ctype=text/javascript'); | ||
console.log("Pikipedia JS temporary test, please ignore. Test content: 'checkpoint 4'"); | |||
/* Upload page script */ | /* Upload page script */ | ||
mw.loader.load('//www.pikminwiki.com/index.php?title=MediaWiki:PikipediaUpload.js' | mw.loader.load('//www.pikminwiki.com/index.php?title=MediaWiki:PikipediaUpload.js' | ||
+ '&action=raw&ctype=text/javascript'); | + '&action=raw&ctype=text/javascript'); | ||
console.log("Pikipedia JS temporary test, please ignore. Test content: 'checkpoint 5'"); | |||
/* End of mw.loader.using callback */ | |||
} ); | |||
/* DO NOT ADD CODE BELOW THIS LINE */ |