Skip to content
TORNLIFE More

eventsTracker - Multi-Event Countdown

Started by stel [2672610] on in Tools & Userscripts.

1 replies · 54 views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 2 / 2 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
2
Discussion span
→
People posting
2
Likes on archived posts
2
Authority score
34 / 100
Historical score
18 / 100
Story score
24 / 100
Engagement score
41 / 100

Mentioned in this thread

Ljovcheg [3191064] ×1

stel [2672610]

Hey everyone,
I made a userscript that tracks Torn events and shows countdowns directly in the clock dropdown. It's called eventsTracker.

 


What it does:
Shows upcoming events with countdowns when you toggle the clock. You can see multiple events at once, and it handles both events that haven't started yet and ones currently running.


Features:

  • Multi-event display* - See up to 2 events simultaneously
  • Two display modes - Toggle between icons and full event names (click icon/event name to switch)
  • Smart caching - Doesn't spam the API, respects rate limits
  • Visual alerts** - New or upcoming Events get a pulsing animation
  • Color coding - Active events are red, upcoming are yellow, future ones white
  • Persistent storage - Remembers your API key and preferences

 

Setup:

  1. Install the script
  2. Open the clock - you'll see "Click → Enter MINIMAL API key"
  3. enter your API and confirm
  4. Done

 

The script fetches events once per 30 minutes to stay well under API limits. If you want to force a refresh, long-press the timer for 1 second.

 

Technical stuff:

Uses fuzzy matching for event names (handles typos and variations in the API)
Calculates event times for recurring events (more on this below)
Has a cleanup system that removes old event data every week
Caches SVG icons to reduce DOM operations

Event prediction system: Since Torn's events API is often incomplete or inaccurate, the script predicts event dates based on patterns (Easter calculations, recurring dates, etc.) and validates API data when available. Falls back to predictions if API data is missing or implausible.

 

*Multi-event display: Shows up to 2 events when there's both an active event and an upcoming one starting within 7 days. If multiple events are active at once, shows the 2 ending soonest.

**Visual alerts: Clock flashes red when an event starts, yellow when an event enters the 7-day window. For events ending in less than 1 hour: event's icon pulse.

 

Notes:
This was inspired by ljovcheg [3191064]'s eventsTimer script, but I rewrote everything from scratch with different features. The code is completely different.


If you find bugs or have suggestions, let me know. The script works for me but I'm sure there are edge cases I haven't hit yet.

 

Only tested on Torn PDA.
Link: Install

 

 

 

Mentions: Ljovcheg [3191064]