MediaWiki:Gadget-Less.js: Difference between revisions

From Old School Near-Reality Wiki
Jump to navigation Jump to search
(Created page with "window.lessTargets = [ // globals 'MediaWiki:Common.css', 'MediaWiki:Kartographer.css', 'MediaWiki:Minerva.css', 'MediaWiki:Test.css', 'MediaWiki:Vector.css', 'MediaWiki:Vector-darkmode.css', // gadgets 'MediaWiki:Gadget-toplinksDropdown.css', ] if ( window.lessTargets.includes( mw.config.get( 'wgPageName' ).replace(new RegExp('\.less$'),'.css' ) ) ) { mw.loader.load( '//meta.weirdgloop.org/w/MediaWiki:Gadget-Less-core.js?action=raw&...")
 
No edit summary
Tag: Reverted
Line 10: Line 10:
     'MediaWiki:Gadget-toplinksDropdown.css',
     'MediaWiki:Gadget-toplinksDropdown.css',
]
]
mw.loader.implement("ext.less.messages",null,{},{"less-dialog-attempt-parse":"Attempting to parse LESS","less-dialog-check-imports":"One or more files could not be imported, please ensure all @import statements reference existing pages","less-dialog-close":"Close","less-dialog-debug-enabled":"Debug mode enabled","less-dialog-edit-success":"Successfully updated [[$1]]","less-dialog-edit-summary":"Updating CSS from [[$1]]","less-dialog-error-persist":"If this error persists, please report it [[$1|here]]","less-dialog-formatting-css":"Formatting CSS","less-dialog-getting-header":"Getting header comment","less-dialog-getting-mixins":"Getting standard mixins","less-dialog-getting-source":"Getting source file: [[$1]]","less-dialog-import-error":"Failed to import [[$1]]","less-dialog-import-success":"Imported [[$1]] successfully","less-dialog-internal-error":"Internal error","less-dialog-page-not-found":"Page not found, please check your configuration","less-dialog-parse-error-file":
"Parse error on line $1 in [[$2]]","less-dialog-title":"Compiling LESS","less-dialog-unknown-error":"An unknown error has occurred","less-update-css":"Update 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( '//meta.weirdgloop.org/w/MediaWiki:Gadget-Less-core.js?action=raw&ctype=text/javascript' )
mw.loader.load( '//meta.weirdgloop.org/w/MediaWiki:Gadget-Less-core.js?action=raw&ctype=text/javascript' )
}
}

Revision as of 21:27, 4 October 2022

 1 window.lessTargets = [
 2     // globals
 3     'MediaWiki:Common.css',
 4     'MediaWiki:Kartographer.css',
 5     'MediaWiki:Minerva.css',
 6     'MediaWiki:Test.css',
 7     'MediaWiki:Vector.css',
 8     'MediaWiki:Vector-darkmode.css',
 9     // gadgets
10     'MediaWiki:Gadget-toplinksDropdown.css',
11 ]
12 
13 mw.loader.implement("ext.less.messages",null,{},{"less-dialog-attempt-parse":"Attempting to parse LESS","less-dialog-check-imports":"One or more files could not be imported, please ensure all @import statements reference existing pages","less-dialog-close":"Close","less-dialog-debug-enabled":"Debug mode enabled","less-dialog-edit-success":"Successfully updated [[$1]]","less-dialog-edit-summary":"Updating CSS from [[$1]]","less-dialog-error-persist":"If this error persists, please report it [[$1|here]]","less-dialog-formatting-css":"Formatting CSS","less-dialog-getting-header":"Getting header comment","less-dialog-getting-mixins":"Getting standard mixins","less-dialog-getting-source":"Getting source file: [[$1]]","less-dialog-import-error":"Failed to import [[$1]]","less-dialog-import-success":"Imported [[$1]] successfully","less-dialog-internal-error":"Internal error","less-dialog-page-not-found":"Page not found, please check your configuration","less-dialog-parse-error-file":
14 "Parse error on line $1 in [[$2]]","less-dialog-title":"Compiling LESS","less-dialog-unknown-error":"An unknown error has occurred","less-update-css":"Update CSS"});
15 
16 if ( window.lessTargets.includes( mw.config.get( 'wgPageName' ).replace(new RegExp('\.less$'),'.css' ) ) ) {
17 	mw.loader.load( '//meta.weirdgloop.org/w/MediaWiki:Gadget-Less-core.js?action=raw&ctype=text/javascript' )
18 }