User:Wumbolo/editnotice.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 (window.location.href.search('index.php') != -1 && (wgNamespaceNumber === 0 || wgNamespaceNumber === 1)) { $.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);