MediaWiki:Common.js: Difference between revisions

From The Fifth City Wiki
KestrelGirl (talk | contribs)
Never mind lol
enable discord js
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. */
// Helper functions
importScript = function(pageName) {
mw.loader.load( '/w/index.php?title=' + encodeURIComponent( pageName ) + '&action=raw&ctype=text/javascript' );
};
importStylesheet = function(pageName) {
mw.loader.load( '/w/index.php?title=' + encodeURIComponent( pageName ) + '&action=raw&ctype=text/css', 'text/css' );
};
importScript('MediaWiki:DiscordIntegrator/code.js')

Revision as of 02:46, 23 June 2025

/* Any JavaScript here will be loaded for all users on every page load. */

// Helper functions
importScript = function(pageName) {
	mw.loader.load( '/w/index.php?title=' + encodeURIComponent( pageName ) + '&action=raw&ctype=text/javascript' );
};

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

importScript('MediaWiki:DiscordIntegrator/code.js')