Change text of the "Reload" button to "Reloading..." after clicking on it

This commit is contained in:
redphx 2023-08-06 07:25:57 +07:00
parent 19856e6381
commit 3e97263caa

View File

@ -2022,7 +2022,10 @@ function injectSettingsButton($parent) {
// Setup Reload button
const $reloadBtn = CE('button', {'class': 'better-xcloud-settings-reload-button', 'tabindex': 0}, 'Reload page to reflect changes');
$reloadBtn.addEventListener('click', e => window.location.reload());
$reloadBtn.addEventListener('click', e => {
window.location.reload();
$reloadBtn.textContent = 'Reloading...';
});
$wrapper.appendChild($reloadBtn);
// Add Settings UI to the web page