mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-05 17:28:31 +02:00
declare original_text
This commit is contained in:
parent
4df17d7de0
commit
5ddffe18e2
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue