User:Monster Domosed/common.js: Difference between revisionsGive feedback
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
( function () { | ( function () { | ||
'use strict'; | 'use strict'; | ||
var L = '{' + '{'; | var L = '{' + '{'; | ||
| Line 158: | Line 156: | ||
// ---- OUTPUT --------------------------------------------------------- | // ---- OUTPUT --------------------------------------------------------- | ||
function buildOutput( entries, heroes, abilities, items, gameModes ) { | function buildOutput( entries, heroes, abilities, items, gameModes ) { | ||
var general = []; | var general = []; | ||
| Line 263: | Line 259: | ||
// ---- INIT ----------------------------------------------------------- | // ---- INIT ----------------------------------------------------------- | ||
function init() { | function init() { | ||
var app = document.getElementById( 'patchformatter' ); | var app = document.getElementById( 'patchformatter' ); | ||
if ( !app ) { | if ( !app ) { | ||
return; | return; | ||
} | } | ||
| Line 294: | Line 287: | ||
var status = new OO.ui.LabelWidget(); | var status = new OO.ui.LabelWidget(); | ||
var container = document.createElement('div'); | var container = document.createElement( 'div' ); | ||
container.appendChild( inputWidget.$element[ 0 ] ); | container.appendChild( inputWidget.$element[ 0 ] ); | ||
| Line 334: | Line 327: | ||
} ).catch( function ( e ) { | } ).catch( function ( e ) { | ||
status.setLabel( 'Error' ); | status.setLabel( 'Error' ); | ||
| Line 350: | Line 342: | ||
} | } | ||
mw.loader.using( [ | mw.loader.using( [ | ||
'oojs-ui-core', | 'oojs-ui-core', | ||
| Line 357: | Line 348: | ||
'mediawiki.util' | 'mediawiki.util' | ||
] ).then( function () { | ] ).then( function () { | ||
init(); | init(); | ||
} ); | } ); | ||