MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary Tag: Manual revert |
mNo edit summary Tag: Reverted |
||
Line 46: | Line 46: | ||
// Widget:Rescue Password Generator/script.js | // Widget:Rescue Password Generator/script.js | ||
mw.loader.load('/w/index.php?title=Widget:Rescue_Password_Generator/script.js&action=raw&ctype=text/javascript'); | mw.loader.load('/w/index.php?title=Widget:Rescue_Password_Generator/script.js&action=raw&ctype=text/javascript'); | ||
// charts.js | |||
mw.loader.load('https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js&integrity=sha512-CQBWl4fJHWbryGE+Pc7UAxWMUMNMWzWxF4SQo9CgkJIN1kx6djDQZjh3Y8SZ1d+6I+1zze6Z7kHXO7q3UyZAWw==&crossorigin=anonymous&referrerpolicy=no-referrer&action=raw'); |
Revision as of 17:14, 16 April 2024
/* Any JavaScript here will be loaded for all users on every page load. */
/* a11y */
$("a.mw-wiki-logo").attr("title", "Mystery Dungeon Franchise Wiki");
/* end a11y */
// https://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization
/* Check if we're editing a page. */
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
// Add a hook handler.
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
// Configure a new toolbar entry on the given $textarea jQuery object.
$textarea.wikiEditor( 'addToToolbar', {
section: 'characters',
pages: {
gametitles: {
layout: 'characters',
label: 'Game Titles',
characters: ['{{Shiren|Shiren the Wanderer 3 - The Sleeping Princess and the Karakuri Mansion}}', '{{Pkmn|Pokémon Mystery Dungeon: Red and Blue Rescue Team}}', '{{Pkmn|Pokémon Mystery Dungeon: Gates to Infinity}}', '{{Pkmn|Pokémon Super Mystery Dungeon}}', '{{Pkmn|Pokémon Mystery Dungeon: Rescue Team DX}}']
}
}
} );
$textarea.wikiEditor( 'addToToolbar', {
section: 'characters',
pages: {
consolelogos: {
layout: 'characters',
label: 'Console Logos',
characters: ['{{ConsoleLogo|Wii|small}}', '{{ConsoleLogo|3DS|small}}', '{{ConsoleLogo|DS|small}}', '{{ConsoleLogo|GBA|small}}', '{{ConsoleLogo|GB|small}}']
}
}
} );
} );
}
/* Include in the wiki the following JavaScript pages */
// MediaWiki:Sandbox.js
mw.loader.load('/w/index.php?title=MediaWiki:Sandbox.js&action=raw&ctype=text/javascript');
// MediaWiki:Countdown.js
mw.loader.load('/w/index.php?title=MediaWiki:Countdown.js&action=raw&ctype=text/javascript');
// Widget:Rescue Password Generator/script.js
mw.loader.load('/w/index.php?title=Widget:Rescue_Password_Generator/script.js&action=raw&ctype=text/javascript');
// charts.js
mw.loader.load('https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js&integrity=sha512-CQBWl4fJHWbryGE+Pc7UAxWMUMNMWzWxF4SQo9CgkJIN1kx6djDQZjh3Y8SZ1d+6I+1zze6Z7kHXO7q3UyZAWw==&crossorigin=anonymous&referrerpolicy=no-referrer&action=raw');