From 15583f138b7ac4f6ff8e491bcc3ae1d2d2e53b14 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Tue, 21 Apr 2020 15:52:23 -0400 Subject: [PATCH] simplify slightly --- src/interaction/slaveInteract.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/interaction/slaveInteract.js b/src/interaction/slaveInteract.js index cd3a265ea64..e37eebfc2a2 100644 --- a/src/interaction/slaveInteract.js +++ b/src/interaction/slaveInteract.js @@ -25,20 +25,18 @@ App.UI.SlaveInteract.modify = function(slave) { /** @type {App.Entity.SlaveState} */ const {he, his} = getPronouns(slave); let el = new DocumentFragment(); - let p; let div; let note; + let sceneIntro = document.createElement('p'); + sceneIntro.className = "scene-intro"; + if (["be your agent", "live with your agent"].includes(slave.assignment)) { - p = document.createElement('p'); - p.className = "scene-intro"; - p.textContent = "Recall your agent to modify them."; - el.append(p); + sceneIntro.textContent = "Recall your agent to modify them."; + el.append(sceneIntro); } else { - p = document.createElement('p'); - p.className = "scene-intro"; - p.textContent = "Take slave to another room."; - el.append(p); + sceneIntro.textContent = "Take slave to another room."; + el.append(sceneIntro); // Salon div = document.createElement('div'); -- GitLab