User:Mavoc/global.js

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

/* Edit Modules in Wide Mode */ $("#EditPage").removeClass("editpage-sourcewidemode-off").addClass("editpage-sourcewidemode-on"); $("#EditPageToolbar").addClass("ace-editor-wide");

/* Add Page Load Statistics to the bottom of the page. */ 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))} });

/* Add Useful Links after Page Load Statistics */ 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) ");