Difference between revisions of "MediaWiki:Common.js"

From QWiki
(Created page with "→‎Any JavaScript here will be loaded for users using the LiquiFlow skin: /************************************* LOAD SCRIPTS FOR VARIOUS TEMPLATES **********************...")
 
(Blanked the page)
Line 1: Line 1:
/* Any JavaScript here will be loaded for users using the LiquiFlow skin */
 
  
/*************************************
 
  LOAD SCRIPTS FOR VARIOUS TEMPLATES
 
*************************************/
 
 
var loadPagesFromLocal = [];
 
var loadPagesFromCommons = [];
 
 
/*  BRACKETS AND GROUPTABLES  */
 
if($('.bracket, .grouptable, .matchlist').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Bracket.js');
 
}
 
 
/*  CROSSTABLES  */
 
if($('.crosstable').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Crosstable.js');
 
}
 
 
/*  TABS  */
 
if($('.tabs').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Tabs.js');
 
}
 
 
/*  LIQUIPEDIA LINKS  */
 
if($('.liquipedia-links').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Liquipedia_links.js');
 
}
 
 
/*  PRIZE POOL TABLES  */
 
if($('.prizepooltable').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Prizepooltable.js');
 
}
 
 
/*  DISMISSABLE SITENOTICE  */
 
if($('#siteNotice').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/SiteNotice.js');
 
}
 
 
/*  SELECT ALL FOR TEMPLATE COPYPASTES  */
 
if($('pre.selectall').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Selectall.js');
 
}
 
 
/*  COUNTDOWN  */
 
if($('.countdown, .datetime').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Countdown.js');
 
}
 
 
/*  LIQUID BOXES  */
 
if($('.justify-wrap').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Liquid_boxes.js');
 
}
 
 
/*  COLLAPSIBLES  */
 
if($('.collapsible, .NavFrame').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Collapse.js');
 
}
 
 
/*  INFOBOXES  */
 
if($('.fo-nttax-infobox-wrapper').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Infobox.js');
 
}
 
 
/*  MAIN PAGE  */
 
if($('body.page-Main_Page, body.page-Main_Page_LiquiFlow, .share-birthday').length) {
 
loadPagesFromCommons.push('MediaWiki:Common.js/Mainpage.js');
 
}
 
 
/*  MISCELLANEOUS  */
 
loadPagesFromCommons.push('MediaWiki:Common.js/Miscellaneous.js');
 
 
/*  CALENDAR  */
 
if($('.calendar').length) {
 
loadPagesFromLocal.push('MediaWiki:Common.js/Calendar.js');
 
}
 
 
/***************************************
 
  ACTUALLY LOAD THE STUFF WE ASKED FOR
 
***************************************/
 
 
/*  COMMONS  */
 
if(loadPagesFromCommons.length) {
 
mw.loader.load('//wiki.teamliquid.net/commons/load.php?articles=' + loadPagesFromCommons.join('|') + '&only=scripts&mode=articles' + (mw.util.getParamValue('debug') == 'true' ? '&debug=true' : '') + '&*');
 
}
 
 
/*  LOCAL  */
 
if(loadPagesFromLocal.length) {
 
mw.loader.load('//wiki.teamliquid.net/starcraft2/load.php?articles=' + loadPagesFromLocal.join('|') + '&only=scripts&mode=articles' + (mw.util.getParamValue('debug') == 'true' ? '&debug=true' : '') + '&*');
 
}
 

Revision as of 08:34, 7 November 2016