declare original_text

This commit is contained in:
Rachid Mrad 2024-11-26 12:35:10 -05:00
parent 4df17d7de0
commit 5ddffe18e2
No known key found for this signature in database

View file

@ -292,14 +292,14 @@ export function initCopyRequestSummary() {
buttonIcon.setAttribute('xlink:href', baseHref + '#check');
// Change the button text
let nearestSpan = copyButton.querySelector("span")
original_text = nearestSpan.innerText
nearestSpan.innerText = "Copied to clipboard"
let nearestSpan = copyButton.querySelector("span");
let original_text = nearestSpan.innerText;
nearestSpan.innerText = "Copied to clipboard";
setTimeout(function() {
// Change back to the copy icon
buttonIcon.setAttribute('xlink:href', currentHref);
nearestSpan.innerText = original_text
nearestSpan.innerText = original_text;
}, 2000);
}