From e16f0af1e5fd7d64869510bf68834f550b93ce68 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sun, 6 Dec 2020 00:04:47 -0500 Subject: [PATCH] change structure to be more clear about what is being returned --- src/facilities/fsDecoration.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/facilities/fsDecoration.js b/src/facilities/fsDecoration.js index a4d0a9d7144..cd6b618079d 100644 --- a/src/facilities/fsDecoration.js +++ b/src/facilities/fsDecoration.js @@ -60,18 +60,18 @@ App.UI.facilityRedecoration = function() { activeFacilities.set(V.masterSuiteName, "masterSuiteDecoration"); } - const option = options.addOption(`Change style for all facilities`); - modifyAll(option); + options.addOption(`Change style for all facilities`) + .addCustomDOM(modifyAll()); for (const [name, decoration] of activeFacilities) { - const option = options.addOption(`The decoration style of ${name} is`); - createPulldown(option, decoration); + options.addOption(`The decoration style of ${name} is`) + .addCustomDOM(createPulldown(decoration)); } el.append(options.render()); return el; - function createPulldown(option, variable) { + function createPulldown(variable) { const select = document.createElement("select"); select.classList.add("rajs-list"); @@ -99,10 +99,10 @@ App.UI.facilityRedecoration = function() { V[variable] = O.value; App.UI.reload(); }; - option.addCustomDOM(select); + return select; } - function modifyAll(option) { + function modifyAll() { const select = document.createElement("select"); select.classList.add("rajs-list"); @@ -141,7 +141,7 @@ App.UI.facilityRedecoration = function() { App.UI.reload(); }; select.selectedIndex = -1; - option.addCustomDOM(select); + return select; } }; -- GitLab