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',    ] });

$(document).ready(function {	(function { "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, rvslots: '*', titles: pageTitle, formatversion: 2})				.then(function(response) { var pageWikitext = response.query.pages[0].revisions[0].slots.main.content; navigator.clipboard.writeText(pageWikitext); mw.notify("Successfully copied!"); })				.catch(function(e) { mw.notify(e); throw new Error(e); });			});		}	});	(function { "use strict"; $("li#global-navigation-user-signout + li + li + li").after("My Sandbox"); }); }); //