User:Saftzie/global.js

// __NOINDEX__

(function (mw, $) { 'use strict';

// add classes to closed and highlighted thread items if (mw.config.get('wgNamespaceNumber') === 2000) {   $(function     {      $('.ThreadList > .thread').each(function {       var li = $(this);

$.post(mw.util.wikiScript('wikia'),       {          controller: 'Forum',          method: 'brickHeader',          id: li.data('id'),          format: 'json'        }, function (data)        {          if (data.isClosed)          {            li.addClass('g-closed');          }          if (data.isNotifyeveryone)          {            li.addClass('g-highlight');          }        }); });   });  } }(mediaWiki, jQuery));