MediaWiki:Gadget-Less.js

From Old School Near-Reality Wiki
Revision as of 21:27, 4 October 2022 by Bawolff (talk | contribs)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
 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 }