diff --git a/src/js/slaveExpenses.js b/src/js/slaveExpenses.js index 9327b167f0a27bd01feb87deb0025fc4658a47f3..73b7cb5b81ea0d50c72c310e4e22ce6c85883c58 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);