MediaWiki:ChatUserpageLink.js

//ChatUserpageLink - Count of Howard //v1.0 21-9-16 Initial build if (mw.config.get("wgCanonicalSpecialPageName") !== "Chat") { return; } $.each(['show', 'hide'], function (i, ev) {    var el = $.fn[ev];    $.fn[ev] = function  {      this.trigger(ev);      el.apply(this, arguments);      return el;    };  }); $('#UserStatsMenu').on('show', function {   var avatar = $('#UserStatsMenu .info > img');    //Pretty messy way to get the proper username    var username = $("#UserStatsMenu .info ul").children(".username").text.replace(/ /g,"_");    var address = mw.config.get('wgServer') + mw.config.get('wgArticlePath'). replace( "$1", "User:" + username);    $(avatar).wrap("");  }); }) (this.jQuery, this.mediaWiki);
 * (function($, mw) {