User:Drmost/common.js

/* Script to copy text wrapped within texmplate */ var copy = document.getElementsByClassName("copy"); for (var i = 0; i < copy.length; i++) { copy[i].addEventListener("click", function {   	navigator.clipboard.writeText(this.getInnerHTML);    	alert("Text copied!");    }, false); }