From b626fb7d41d3a4e611747bf3e34a0a47713df561 Mon Sep 17 00:00:00 2001 From: dev Date: Sun, 7 Jun 2026 14:00:40 -0500 Subject: [PATCH] fix(bundle): stop pre-escaping gym name in embedded dom.js (apostrophe fix) The embedded currentAttribute() in the bundle was returning gym: tatEsc(gym), but the render template in Dialog.render also escapes with tatEsc(s.gym). The double-escape turned 'George's' into 'George's', which the browser decoded to the visible text 'George's'. The src/dom.js source does NOT pre-escape (returns the raw gym string and lets the render template handle escaping once). This commit restores the mirror in the embedded dom.js so the bundle matches the source. No changes to src/dom.js (it was already correct). Co-Authored-By: Claude Opus 4.8 --- torn-attribute-tracker.user.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/torn-attribute-tracker.user.js b/torn-attribute-tracker.user.js index 697b019..279f3d9 100644 --- a/torn-attribute-tracker.user.js +++ b/torn-attribute-tracker.user.js @@ -131,7 +131,7 @@ const current = tatExtractValueFromLi(li); if (current == null) return null; const gym = tatFindGymName() || 'Unknown gym'; - return { attr: attr, current: current, gym: tatEsc(gym) }; + return { attr: attr, current: current, gym: gym }; } function tatFindActiveAttributeLi() { // Priority 1: the
  • with the "success" class (just trained). @@ -276,7 +276,8 @@ // ===== ui.js (embedded) ===== const TAT_STYLE = ` .tat-root { position: fixed; z-index: 99999; min-width: 320px; max-width: 420px; background: #2b2b2b; color: #ddd; border: 1px solid #444; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); font: 13px/1.4 Tahoma, Verdana, sans-serif; padding: 12px 14px; } - .tat-root.tat-anchored { position: static; margin: 0 auto 12px; max-width: 720px; box-shadow: none; } + .tat-root.tat-anchored { position: static; margin: 0 0 12px 0; max-width: none; box-shadow: none; border-radius: 0; border: 1px solid #444; border-top: 2px solid #c00; padding: 16px 20px; } + .tat-root.tat-anchored .tat-header { cursor: default; } .tat-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid #444; cursor: move; user-select: none; } .tat-header strong { color: #fff; } .tat-close { cursor: pointer; opacity: 0.6; padding: 0 4px; }