|
|
|
|
@ -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');
|
|
|
|
|
|