MediaWiki:Mobile.js: Unterschied zwischen den Versionen

Aus KiwiThek
Wechseln zu: Navigation, Suche
 
Zeile 12: Zeile 12:
  
 
   stylesheets.forEach(function (stylesheet) {
 
   stylesheets.forEach(function (stylesheet) {
    var urlencodedName = encodeURIComponent(stylesheet)
+
     mw.loader.load('/index.php?title=' + encodeURIComponent(stylesheet) + '&action=raw&ctype=text/css', 'text/css');
     mw.loader.load(`/index.php?title=${urlencodedName}&action=raw&ctype=text/css`, 'text/css');
 
 
   })
 
   })
 
});
 
});

Aktuelle Version vom 7. Oktober 2020, 08:36 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) {
    mw.loader.load('/index.php?title=' + encodeURIComponent(stylesheet) + '&action=raw&ctype=text/css', 'text/css');
  })
});