MediaWiki:Mobile.js

/* Any JavaScript here will be loaded for users using the mobile site */

var importScript = function (s) { mw.loader.load( '/w/index.php?title=' + encodeURIComponent(s) + '&action=raw&ctype=text/javascript' ); }; var importStylesheet = function (s) { mw.loader.load( '/w/index.php?title=' + encodeURIComponent(s) + '&action=raw&ctype=text/css', 'text/css' ); };

// page-specific // original idea was User:TheFearow's // lynchpin for dialog importScript( 'MediaWiki:Common.js/w/' + mw.config.get( 'wgPageName' ) );