From d6eab11f6277d601e984be960ec86f17aafe5fd7 Mon Sep 17 00:00:00 2001
From: Anu <barrychahal@gmail.com>
Date: Sun, 2 Aug 2020 03:11:38 -0700
Subject: [PATCH] Update slaveExpenses.js

---
 src/js/slaveExpenses.js | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/js/slaveExpenses.js b/src/js/slaveExpenses.js
index 9327b167f0a..73b7cb5b81e 100644
--- a/src/js/slaveExpenses.js
+++ b/src/js/slaveExpenses.js
@@ -214,15 +214,18 @@ globalThis.slaveImpactLongTerm = function(slave) {
 				p.append(div);
 			} else {
 				/* lowercasedonkey: TODO: I don't like how vague my placeholder is. Probably need to set up some kind of sliding scale to describe how much rep (roughly) she has made or lost. Need to get a sense of common ranges. */
-				text = `Overall, ${he} has `;
+				div = document.createElement("div");
+				div.classList.add("indent");
+				div.append(`Overall, ${he} has `);
 				if (_repTotal === 0) {
-					text += `had no impact on your reputation.`;
+					div.append(`had no impact on `);
 				} else if (_repTotal > 0) {
-					text += `<span class="green">increased</span> your reputation.`;
+					App.UI.DOM.appendNewElement("span", div, `increased `, "green");
 				} else if (_repTotal < 0) {
-					text += `<span class="red">decreased</span> your reputation.`;
+					App.UI.DOM.appendNewElement("span", div, `decreased `, "red");
 				}
-				App.UI.DOM.appendNewElement("div", p, text, "indent");
+				div.append(`your reputation.`);
+				p.append(div);
 			}
 		}
 		frag.append(p);
-- 
GitLab