diff --git a/clipboard.js b/clipboard.js index d23935d..18f5094 100755 --- a/clipboard.js +++ b/clipboard.js @@ -9,20 +9,23 @@ function copyToClipboard(elementId) { /* Copy the text inside the text field */ navigator.clipboard.writeText(copyText); - var tooltip = document.getElementById("tooltip"); - tooltip.innerHTML = "Copied"; + var tooltip = document.getElementsByClassName('tooltiptext'); + for (var i = 0; i < tooltip.length; i++) { + tooltip[i].innerHTML = "Copied"; + } } function resetCopy() { - var tooltip = document.getElementById("tooltip"); - tooltip.innerHTML = "Copy to clipboard"; + var tooltip = document.getElementsByClassName('tooltiptext'); + for (var i = 0; i < tooltip.length; i++) { + tooltip[i].innerHTML = "Copy to clipboard"; + } } // Event Listeners -// tooltipped has tooltip and clipboard classes //const clipboard = querySelector('.tooltiptext'); const minecraft = document.getElementById('minecraft-clip'); diff --git a/index.html b/index.html index 279ad98..3659e34 100755 --- a/index.html +++ b/index.html @@ -77,7 +77,7 @@ IP: anetwork.uk Port: 7777 - Copy to clipboard + Copy to clipboard