Let the user provide their own text for the spinner.

This commit is contained in:
voussoir 2022-03-10 15:52:18 -08:00
parent ad1655bf3e
commit d23976334c
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -138,7 +138,7 @@ function init_button_with_spinner()
else else
{ {
spinner_element = document.createElement("span"); spinner_element = document.createElement("span");
spinner_element.innerText = "Working..."; spinner_element.innerText = button.dataset.spinnerText || "Working...";
spinner_element.classList.add("hidden"); spinner_element.classList.add("hidden");
holder.appendChild(spinner_element); holder.appendChild(spinner_element);
} }