mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-11 08:23:49 +00:00
javascript: Don't resubmit when refreshing the page
This was not caught earlier because the problem was masked by turbolinks usage. Tests: - Install an app and see the page refreshing. - Run manual update and see the page refreshing. - Update Tor configuration and see the page refreshing. - Run diagnostics from the diagnostics module and see the page refreshing. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
68bc333842
commit
ea037aa944
@ -28,7 +28,8 @@ function sleep(ms) {
|
||||
// Refresh the page once in n seconds
|
||||
async function refresh(ms) {
|
||||
await sleep(3000);
|
||||
window.location.reload();
|
||||
// Refresh the page without resubmitting the POST data.
|
||||
window.location = window.location.href;
|
||||
}
|
||||
|
||||
refresh();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user