MediaWiki:Mobile.js: Unterschied zwischen den Versionen

Aus KiwiThek
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „* * MediaWiki:Mobile.js * * based upon https://www.mediawiki.org/wiki/MediaWiki:Mobile.js: console.log('Up and running! :D') mw.loader.using(['mediawi…“)
 
Zeile 6: Zeile 6:
 
console.log('Up and running! :D')
 
console.log('Up and running! :D')
  
mw.loader.using(['mediawiki.util'], function () {
+
mw.loader.using( ['mediawiki.util'], function () {
 
   var stylesheets = [
 
   var stylesheets = [
     'MediaWiki:Mobile.css',
+
     'MediaWiki:Mobile.css'
   ]
+
   ];
  
   stylesheets.forEach((stylesheet) => {
+
   stylesheets.forEach(function (stylesheet) {
 
     var urlencodedName = encodeURIComponent(stylesheet)
 
     var urlencodedName = encodeURIComponent(stylesheet)
     mw.loader.load(
+
     mw.loader.load(`/index.php?title=${urlencodedName}&action=raw&ctype=text/css`, 'text/css');
      `/index.php?title=${urlencodedName}&action=raw&ctype=text/css`,
 
      'text/css')
 
 
   })
 
   })
})
+
});

Version vom 7. Oktober 2020, 08:35 Uhr

/**
 * MediaWiki:Mobile.js
 *
 * based upon https://www.mediawiki.org/wiki/MediaWiki:Mobile.js
 */
console.log('Up and running! :D')

mw.loader.using( ['mediawiki.util'], function () {
  var stylesheets = [
    'MediaWiki:Mobile.css'
  ];

  stylesheets.forEach(function (stylesheet) {
    var urlencodedName = encodeURIComponent(stylesheet)
    mw.loader.load(`/index.php?title=${urlencodedName}&action=raw&ctype=text/css`, 'text/css');
  })
});