option mehrere copier sachen auf einer seite zu haben

This commit is contained in:
home
2020-06-25 10:47:22 +02:00
parent 67c8a2f7c1
commit ff138c18a9
2 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
function copyToClipboard() {
var copyText = document.getElementById("copy-to-clipboard");
function copyToClipboard(id) {
var copyText = document.getElementById(id);
/* Select the text field */
copyText.select();
@@ -9,12 +9,12 @@ function copyToClipboard() {
document.execCommand("copy");
}
function copiedToClipboard() {
var tooltip = document.getElementById("copy-to-clipboard-tooltip");
function copiedToClipboard(id) {
var tooltip = document.getElementById(id);
tooltip.innerHTML = "Kopiert";
}
function resetClipboard() {
var tooltip = document.getElementById("copy-to-clipboard-tooltip");
function resetClipboard(id) {
var tooltip = document.getElementById(id);
tooltip.innerHTML = "Kopieren";
}