MediaWiki:Gadget-workinprogress.js: Unterschied zwischen den Versionen

[+/-]

Widgets

Widgets

Gewünschte Seiten
Wer ist online?
Aus Matura Wiki
Wechseln zu: Navigation, Suche
(Created page with "/** * Gadget to change the wiki page appearance * to appear as if it is opposite to what is considered by some the aspired convention. * For example, make titles appear tit...")
 
K (1 Version importiert: workinprogress)
 
(kein Unterschied)

Aktuelle Version vom 21. Juli 2015, 10:35 Uhr

/**
 * Gadget to change the wiki page appearance
 * to appear as if it is opposite to what is considered by some the aspired convention.
 * For example, make titles appear title case instead of sentence case.
 */
mw.loader.using( 'mediawiki.Title', function () {
  var title = new mw.Title( mw.config.get( 'wgPageName' ) );
  var wipTitle = title.toText().replace(/(\b[^\b])/g, function ( str ) {
    return str.toUpperCase();
  } );
  $( '.firstHeading' ).text( wipTitle );
} );