A minimalist, TCT-synchronized streak tracker. Works with Public Access API keys. Resets if inactive for 24h.
A minimalist, TCT-synchronized login streak tracker for Home and Inventory. Works with Public Access API keys and resets after 24 hours of inactivity.
Detailed Description:
This script provides a non-intrusive way to track your daily consistency in Torn City. It is designed to be lightweight and secure, appearing only on your most-visited pages.
TCT/GMT Synchronized: The streak rollover and inactivity checks are based on Torn City Time (GMT) to ensure accuracy regardless of your local timezone.
Automatic Reset: The script monitors your "Last Action" via the Torn API. If you have not performed any in-game activity for a full 24-hour window, the streak will reset to 1.
Secure Public Access: Only requires a Public Access API Key. The script will prompt you for this key on the first run and store it safely in your browser's local storage.
Discreet UI: A slim, dark-themed HUD element at the top-middle of the screen that blends into the Torn interface.
How to Modify the Code
For those who want to customize the script, the code is organized into clear sections:
Adjusting the "Reset" Window:
Search for hoursSinceActive > 24. You can change 24 to a higher number (like 48) if you want a more lenient streak that allows for a full day off.
Changing the Visual Theme:
Under streakBox.style, you can edit color: #00ff00; to change the text color (e.g., #ffffff for white or #f2ef11 for Torn yellow). You can also change background: rgba(10, 10, 10, 0.9); to make the box more or less transparent.
Adding More Pages:
To show the streak on other pages (like the Gym or Faction page), add more @match lines in the metadata header, for example:
// @match https://www.torn.com/gym.php*