MediaWiki:Common.js: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
(Replaced content with "→‎Any JavaScript here will be loaded for all users on every page load.: →‎Syntax highlighter timeout: syntaxHighlighterConfig = { timeout: 1000, } /* Move game...")
Tag: Replaced
mNo edit summary
 
(28 intermediate revisions by the same user not shown)
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 desktop */


/* Syntax highlighter timeout */
/* Add user subpages toolbox link */
syntaxHighlighterConfig = {
$(function() {
    timeout: 1000,
if (mw.config.get('wgCanonicalNamespace') === 'User' && mw.config.get('skin') !== 'timeless') {
}
var subpagesLink = '/Special:PrefixIndex/User:' + mw.config.get('wgTitle').split('/')[0] + '/';
 
mw.util.addPortletLink('p-tb', subpagesLink, 'User subpages', 't-subpages', 'Subpages for this user');
/* Move game icons into #content for more consistent positioning */
}
$(function () {$('#game-icons').css('margin-top', '2px').insertBefore($('#firstHeading'))})
 
/* Pikan */
$.getScript('/index.php?title=User:Espyo/pikan-core.js'
+ '&action=raw&ctype=text/javascript', function () {
  mw.loader.load('/index.php?title=User:Espyo/pikan-pikipedia.js'
  + '&action=raw&ctype=text/javascript');
});
});
/* Upload page script */
mw.loader.load('/index.php?title=MediaWiki:PikipediaUpload.js'
+ '&action=raw&ctype=text/javascript');

Latest revision as of 16:14, April 3, 2024

/* Any JavaScript here will be loaded for all users on desktop */

/* Add user subpages toolbox link */
$(function() {
	if (mw.config.get('wgCanonicalNamespace') === 'User' && mw.config.get('skin') !== 'timeless') {
		var subpagesLink = '/Special:PrefixIndex/User:' + mw.config.get('wgTitle').split('/')[0] + '/';
		mw.util.addPortletLink('p-tb', subpagesLink, 'User subpages', 't-subpages', 'Subpages for this user');
	}
});