User:WooperIsBest/common.js/archive2.js

/* * Script: UserpageEditButton * Author: WooperIsBest * * This script brings the edit button to userpages. It can be used sitewide or personally, but only wiki staff members have the permission to use it. /*   'use strict'; var page = window.location.pathname; var config = mw.config.get([   		'wgNamespaceNumber',    		'wgUserName',    		'wgTitle',    		'wgUserGroups'    	]); if(config.wgNamespaceNumber == 2 && page.includes('User:' + config.wgUserName) === false){ //if it is someone else's userpage if(document.getElementById( 'firstHeading' ).innerHTML.includes('/') === false){ //if it is not a subpage if(config.wgUserGroups.includes('sysop') || config.wgUserGroups.includes('content-moderator')){ //if sysop or content mod var pageHeader = $('#PageHeader .page-header__contribution .page-header__contribution-buttons'); //gets area for buttons $( ' ' + //HTML to append					'' +						'' + 							' ' + 						' ' +						' Edit ' +					'' +					' ' +						'' +							'' + 								' ' +							' ' +						' ' +					'' +						'' +							'' + 								'' +									'VisualEditor' + 								'' +							'' + 							'' +								'' + 'Protect' + '' + '</li>' + '' + '<a id="ca-talk" href="/wiki/User_Talk:' + config.wgTitle + '" class="new" data-tracking="ca-talk-dropdown">' + 'Message Wall' + '</a>' + '</li>' + '</ul>' + ' ' +				' ' +			' '				).appendTo(pageHeader); //append HTML   		}    	}    } }(this, this.jQuery, this.mediaWiki));
 * (function (window, $, mw) {