User:KockaAdmiralac/common.js

(function {   if(!$('#WikiaRail').exists) {        return;    }    $.get('https://services.wikia.com/discussion/2575/threads', function(d) { var elements = d._embedded.contributors[0].userInfo.splice(0, 5).map(function(el) {           return $('', { href: mw.util.wikiGetlink('User:' + el.name), class: 'wds-avatar-stack__avatar', title: el.name }).append( $(' ', {                   class: 'wds-avatar',                    src: (el.avatarUrl || 'https://vignette4.wikia.nocookie.net/messaging/images/1/19/Avatar.jpg/revision/latest') + '/scale-to-width-down/30'                }) );       });        if($('.discussions-module').exists) { $('.discussions-module .wds-avatar-stack').append(elements); } else { var interval = setInterval(function {               if($('.discussions-module').exists) {                    clearInterval(interval);                    $('.discussions-module .wds-avatar-stack').append(elements);                }            }, 100); }   }); });