outputBoxCopyButton.js
1 2 document.addEventListener("DOMContentLoaded", function() { 3 document.getElementById("copyButton").addEventListener("click", function () { 4 const text = document.getElementById("OutputBox").innerText; 5 navigator.clipboard.writeText(text).then(function() { 6 // Maybe add a popup with "Copied!" later. 7 }).catch(function(err) { 8 console.error("ERROR: ", err); 9 }); 10 }); 11 });