From 0916b3fa7c2d97f462e9762baad45ad70d040909 Mon Sep 17 00:00:00 2001 From: Philipp Matthias Schaefer Date: Sat, 27 Feb 2021 14:53:12 +0100 Subject: [PATCH] style(js): break long lines --- src/static/webldappasswd.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/static/webldappasswd.js b/src/static/webldappasswd.js index e11f9ec..bf8bf44 100644 --- a/src/static/webldappasswd.js +++ b/src/static/webldappasswd.js @@ -27,7 +27,9 @@ MODAL_STATES = { }, "FetchError" : { button_disabled : false, - message : function(parameters) { `An error occurred while contacting the server ({parameters.statusCode})` }, + message : function(parameters) { + `An error occurred while contacting the server (${parameters.statusCode})` + }, }, "ServerError" : { button_disabled : false, @@ -50,7 +52,9 @@ function showModal(state_name, parameters) { img.src = state.icon_url; let text = message.childNodes[1]; - text.textContent = " " + (state.message instanceof Function ? state.message(parameters) : state.message); + text.textContent = " " + (state.message instanceof Function + ? state.message(parameters) + : state.message); let button = document.getElementById("close_button"); button.disabled = state.button_disabled; @@ -70,7 +74,8 @@ function changePasswords() { let query = {}; for (field in FIELDS) { - query[FIELDS[field]] = document.querySelectorAll('input[name=' + FIELDS[field] + ']')[0].value; + let selector = `input[name=${FIELDS[field]}]`; + query[FIELDS[field]] = document.querySelectorAll(selector)[0].value; } showModal("Wait");