vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 84dc2eda1f06ba8596474acaa0af77312cf2d673
parent 390d10d6566405c82f96ef57c784a4c910f292b2
Author: BlackDex <black.dex@gmail.com>
Date:   Wed,  4 Mar 2020 15:08:14 +0100

Changed javascript default argument construction

Diffstat:
Msrc/static/templates/admin/page.hbs | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/static/templates/admin/page.hbs b/src/static/templates/admin/page.hbs @@ -203,8 +203,7 @@ <script> function reload() { window.location.reload(); } - function msg(text, reload_page) { - reload_page = (reload_page === undefined) ? true : reload_page; + function msg(text, reload_page = true) { text && alert(text); reload_page && reload(); } @@ -222,8 +221,7 @@ } return false; } - function _post(url, successMsg, errMsg, body, reload_page) { - reload_page = (reload_page === undefined) ? true : reload_page; + function _post(url, successMsg, errMsg, body, reload_page = true) { fetch(url, { method: 'POST', body: body,