MediaWiki:Gadget-Less.js: Difference between revisions
Jump to navigation
Jump to search
(update to local) |
(try again) |
||
Line 1: | Line 1: | ||
/* | |||
MediaWiki:Gadget-Less.js | |||
*/ | |||
window.lessTargets = [ | window.lessTargets = [ | ||
// globals | // globals | ||
Line 10: | Line 13: | ||
'MediaWiki:Gadget-toplinksDropdown.css', | 'MediaWiki:Gadget-toplinksDropdown.css', | ||
] | ] | ||
if ( window.lessTargets.includes( mw.config.get( 'wgPageName' ).replace(new RegExp('\.less$'),'.css' ) ) ) { | if ( window.lessTargets.includes( mw.config.get( 'wgPageName' ).replace(new RegExp('\.less$'),'.css' ) ) ) { | ||
mw.loader.load( '//near-reality.wiki/w/MediaWiki:Gadget-Less-core.js?action=raw&ctype=text/javascript' ) | mw.loader.load( '//near-reality.wiki/w/MediaWiki:Gadget-Less-core.js?action=raw&ctype=text/javascript' ) | ||
} | } | ||
mw.loader.state({ | |||
"ext.gadget.Less": "ready" | |||
}); |
Revision as of 21:47, 4 October 2022
1 /*
2 MediaWiki:Gadget-Less.js
3 */
4 window.lessTargets = [
5 // globals
6 'MediaWiki:Common.css',
7 'MediaWiki:Kartographer.css',
8 'MediaWiki:Minerva.css',
9 'MediaWiki:Test.css',
10 'MediaWiki:Vector.css',
11 'MediaWiki:Vector-darkmode.css',
12 // gadgets
13 'MediaWiki:Gadget-toplinksDropdown.css',
14 ]
15
16 if ( window.lessTargets.includes( mw.config.get( 'wgPageName' ).replace(new RegExp('\.less$'),'.css' ) ) ) {
17 mw.loader.load( '//near-reality.wiki/w/MediaWiki:Gadget-Less-core.js?action=raw&ctype=text/javascript' )
18 }
19 mw.loader.state({
20 "ext.gadget.Less": "ready"
21 });