main
Previously the .tat-root.tat-anchored rule centered the dialog with a 720px max-width and no extra border, which made it look like a floating widget squeezed into the page rather than an embedded panel. The Torn gym page reference is a full-width panel with a thin dark border and a red top accent line. Changes: - margin: 0 0 12px 0 (full-width, no centering) - max-width: none (span the content area) - border-radius: 0 (Torn panels are flat, not rounded) - border: 1px solid #444 with border-top: 2px solid #c00 (red accent) - padding: 16px 20px (more breathing room, matching Torn panels) - .tat-root.tat-anchored .tat-header { cursor: default } (drag is disabled in anchored mode, so the move cursor was misleading) Free-floating mode is unchanged: the .tat-root base rule keeps its rounded shadowed look and .tat-header keeps cursor: move. Mirrored into the embedded TAT_STYLE in the bundle to keep the source and bundle in lockstep. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Torn Attribute Training Tracker
A userscript for torn.com that shows a floating dialog on the gym page with your current attribute, target, rate of gain, and an ETA to the target.
Install
- Install Tampermonkey (or Violentmonkey / Greasemonkey).
- Open
torn-attribute-tracker.user.jsin your editor, copy its contents. - In Tampermonkey, click the dashboard → + (Create new script) → paste → save.
- Visit
https://www.torn.com/gym.php. The dialog appears in the bottom-right.
Use
- Type a target value in the Target field, or pick a milestone from the dropdown.
- The dialog updates live as you train.
- Drag the header to reposition. Click Above training UI to anchor above the gym form. Click Float free to drag again.
- The ✕ closes the dialog for the current page session; it returns on next visit.
Targets, dialog position, and the 30-day train history are stored in localStorage.
Self-test
Load the script with #tat-test in the URL:
https://www.torn.com/gym.php#tat-test
Open the browser console; you'll see [tat] self-test results: followed by OK … / FAIL … lines.
Tests
npm install # no deps; node:test ships with Node 18+
npm test
Files
torn-attribute-tracker.user.js— the script you install in Tampermonkey.src/pure.js,src/store.js,src/dom.js,src/interceptor.js,src/ui.js,src/main.js— source split for testability; the user-facing file is the bundle in step 11.tests/— Node test runner (node --test).
Notes
The DOM scraper and request interceptor are best-effort matches for the current Torn gym page. If Torn updates the markup, you may need to adjust the selectors in src/dom.js and re-bundle by copying the new source into the embedded section in torn-attribute-tracker.user.js.
Description
Languages
JavaScript
100%