MediaWiki:MastheadGender/code.js

(function {   if ($('#UserProfileMasthead').length === 0 || window.MastheadGenderLoaded) {        return;    }    window.MastheadGenderLoaded = true;    mw.loader.using('mediawiki.api').then(function { new mw.Api.get({           action: 'parse',            text: ,            disablepp: true        }).done(function(d) {            var text = d.parse.text['*'].replace(/<\/?p>/g, ).trim;            if (text !== 'neutralstring') {                var $tag = $(' ', { 'class': 'tag MastheadGender', text: text });               $('.masthead-info hgroup').append($tag);                mw.hook('dev.tags').fire($tag);            }        }); }); });