User:Firefly/copyloglink.js

$.when($.ready, mw.loader.using("mediawiki.util")).then(async function {    if (mw.config.get("wgPageName").includes("Special:Log")) {    	$.makeArray($(".mw-logevent-loglines").children).forEach((e)=>{$(e).append(" (copy link)")});    	$(".mw-logevent-loglines").on("click", ".ff-loglinkcopier-link", (e)=>{ const logId = $(e.currentTarget).parent.children("[title='Special:Log']")[0].href.split("logid=")[1]; navigator.clipboard.writeText(`Special:Redirect/logid/${logId}`); });	} });