User:Mavoc/global.js

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MercuryPreview/code.js',    ] });

var STATS = $(' ', { style:"padding-left:12px" }); STATS.insertAfter('.license-description'); STATS.text("Page Load Statistics"); var NEWPP = $(' ', { style:"padding-left:12px; padding-bottom:12px" }); NEWPP.insertAfter(STATS); $('#mw-content-text').contents.filter(function {    if (this.nodeType == 8 && /^\s*(NewPP) /.test(this.data)) {NEWPP.text($.trim(this.data))} }); var LINKS = $(' ', { style:"padding-left:12px" }); LINKS.insertAfter(NEWPP); LINKS.text("Useful Links"); var LINKSHERE = $(' ', { style:"font-size:14px; padding-left:12px; padding-bottom:12px" }); LINKSHERE.insertAfter(LINKS); var url = $(location).attr('href'); var regex = /(^.*?fandom.com\/wiki\/)([^\?]*)\??(.*?$)/ var domain = url.replace(regex, "$1"); var page = url.replace(regex, "$2"); var params = url.replace(regex, "$3"); LINKSHERE.append("What Links Here "); LINKSHERE.append("Watchlist ("); LINKSHERE.append("Add - "); LINKSHERE.append("Remove) ");