mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-16 06:24:12 +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');
|
buttonIcon.setAttribute('xlink:href', baseHref + '#check');
|
||||||
|
|
||||||
// Change the button text
|
// Change the button text
|
||||||
let nearestSpan = copyButton.querySelector("span")
|
let nearestSpan = copyButton.querySelector("span");
|
||||||
original_text = nearestSpan.innerText
|
let original_text = nearestSpan.innerText;
|
||||||
nearestSpan.innerText = "Copied to clipboard"
|
nearestSpan.innerText = "Copied to clipboard";
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
// Change back to the copy icon
|
// Change back to the copy icon
|
||||||
buttonIcon.setAttribute('xlink:href', currentHref);
|
buttonIcon.setAttribute('xlink:href', currentHref);
|
||||||
nearestSpan.innerText = original_text
|
nearestSpan.innerText = original_text;
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue