User:Fred Gandt/addUserContribsEditSummaryCountLink.js

$( document ).ready( => {	"use strict";	if ( mw.config.get( "wgCanonicalSpecialPageName" ) === "Contributions" ) {		const EC_PARENT = document.querySelector( '.mw-contributions-footer li a[href*="//xtools.wmcloud.org/ec/en.wikipedia.org/"]' )?.parentElement,			ESLI = document.createElement( "li" ),			ESA = document.createElement( "a" );		ESA.href = `https://xtools.wmflabs.org/editsummary/en.wikipedia.org/${encodeURIComponent( mw.config.get( "wgTitle" ).replace( "Contributions/", "" ) )}`;		ESA.textContent = "Edit summary count";		ESA.target = "_blank";		ESLI.append( ESA );      console.log( EC_PARENT, ESLI, ESA )        if ( EC_PARENT ) {			EC_PARENT.after( ESLI );		}	} } );