User:Wumbolo/pronouns.js

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

var wgPageName = mw.config.get('wgPageName'); var wgUserName = mw.config.get('wgUserName'); var wgNamespaceNumber = mw.config.get('wgNamespaceNumber'); var wgPageNameSlashPos = wgPageName.indexOf("/");

if (wgNamespaceNumber === 2 || wgNamespaceNumber === 3) { $.getJSON(               mw.util.wikiScript('api'), {                    action: "expandtemplates",                    format: "json",                    text: "",                    prop: "wikitext"                }            ).done(function(data) {                $('#mw-content-text').prepend(' (' + data.expandtemplates.wikitext + ') ');            }) .fail(function(data) {               return;            }); } })(jQuery, mediaWiki);