User:Fisssion/global.js

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:QuickDiff/code.js',        'u:dev:MediaWiki:RevisionDelete.js',        'u:dev:MediaWiki:MultiUpload.js',        'u:dev:MediaWiki:View_Source/code.js',        'u:dev:MediaWiki:LastEdited/code.js',        'u:dev:MediaWiki:AjaxRedirect/code.js',        'u:dev:MediaWiki:Discussions Delete All/code.js',        'u:dev:MediaWiki:MassEdit/code.js',        'u:dev:MediaWiki:MassNullEdit/code.js',    ] }); $(".test-class").replaceWith("test-string") (function copyPageWikitext {	"use strict";	if (mw.config.get('wgIsArticle')) {		$(".page-header__actions").prepend($(" ").addClass("wds-button wds-is-text page-header__action-button sourceCopy").html("📋"));		$(".sourceCopy").click(function { var pageTitle = location.pathname.split("/wiki/").pop; $.getJSON(mw.util.wikiScript('api'), {format: 'json', action: 'query', prop: 'revisions', rvprop: 'content', rvlimit: 1, titles: pageTitle}) .then(function(content) {				var pageName, pageWikitext;				for ( pageName in content.query.pages ) {					pageWikitext = content.query.pages[pageName].revisions[0]['*'];				}				$("body").append($(" ").attr("id", "copyArea").html(pageWikitext));				var copyArea = document.getElementById("copyArea");				copyArea.select;				copyArea.setSelectionRange(0, 99999);				document.execCommand("copy");				copyArea.remove;				mw.notify("Successfully copied!");			}) .catch(function {				mw.notify("API request failed.");			}); });	} }); (function addSandboxButton {	$("li#global-navigation-user-signout + li + li + li").after("My Sandbox"); }); //