User:Bloodfrost of the IceWings/global.css

(function {  var byteChecker = {    buildButton: function  {      var wikiToolbar = document.querySelector( '#WikiaBarWrapper .toolbar .tools' );     var button = dev.ui({ type: 'li', children: [ {           type: 'button', attr: { type: 'button', id: 'js-byteCount-button' }, text: 'Get byte count', events: { click: this.checkPage }, },       ],      });      wikiToolbar.appendChild(button);    },    buildNotification: function (num) {      if (num < 2500)        dev.toasts.warning('Page is smaller than 2500 bytes: ' + num, { timeout: 10000, });     else        dev.toasts.success('Page is larger than 2500 bytes: ' + num, { timeout: 10000, });   },    checkPage: function  {      if (mw.config.get('wgIsArticle')) {        new mw.Api          .get({ action: 'parse', prop: 'wikitext', page: mw.config.get('wgPageName'), format: 'json', })         .done(function (data) { var trimmedPage = data.parse.wikitext['*'] .replace(/(<((abbr|b|big|blockquote|br|center|code|dd|div|dt|em|h1|h2|h3|h4|h5|h6|hr|i|li|ol|p|pre|q|s|small|span|strike|strong|sub|sup|table|td|th|tr|tt|u|ul|!--)[^>]+)>)/gi, '') .replace(/(style="([^"]*)"( \| )?)/gi, )             .replace(/(\[\[)?(File|Category):.*(\]\])?/gi, )              .replace(/[  ]{2,}/, '')              .replace(/^\s*$(?:\r\n?|\n)/gm, '\n');            var byteNum = new Blob([trimmedPage]).size;            byteChecker.buildNotification(byteNum);          });      } else {        dev.toasts.error('This is not an article page!', {          timeout: 10000,        });      }    },  };  importArticles({    type: 'script',    articles: ['u:dev:MediaWiki:Toasts.js', 'u:dev:MediaWiki:UI-js/code.js'],  });  mw.loader.using(['mediawiki.api', 'mediawiki.util']).then(function  {    mw.hook('dev.ui').add(function  {      byteChecker.buildButton;    });  }); }); @import "/load.php?mode=articles&articles=u:dev:MediaWiki:Nord.css&only=styles";