Travel Stock Alert v1.2.0

Drew Morgan
2026-04-06T14:56:14Z

Monitors the foreign shop on the Torn travel page and sends a desktop notification the moment a watched item comes back into stock.

When you fly abroad and the item you want is out of stock, it's easy to leave the tab open and forget about it.
Travel Stock Alert watches the foreign shop for you and fires an OS-level desktop notification
the moment a watched item comes back into stock — even if Torn is in the background or minimised.
Clicking the notification brings the tab straight back into focus.

How to use

1. Fly abroad and open Torn → Travel (page.php?sid=travel).

2. Click the 🔔 Stock Alert button that appears near the top-right of the page.
You can drag it anywhere and it will remember its position.

3. Click Enable Notifications and grant permission in the browser prompt.
Use 🔔 Test Toast to confirm a notification reaches your desktop before relying on it.

4. Tick any items you want to be alerted for — use Select All to tick everything at once.
Each item shows its current stock level (×N) or
OOS if out of stock.

5. Click Save & Watch. The button turns green and shows Watching…
while polling is active.

6. Leave the tab open. The script checks stock every 3 seconds. As soon as any watched item
goes from out-of-stock to available, a desktop notification is sent with the item name,
quantity, and country.

Features

OS-level desktop notifications (Web Notifications API) — visible even when the browser is in the background

Notification fires only on the 0 → in-stock transition, so you won't be spammed for items already available

Covers all three shop types: General Store, Arms Dealer, and Black Market

Draggable button with saved position across sessions

Select All / Deselect All for quick item selection

Live stock counts update in the panel while it's open

Country is saved alongside your item selection — no false alerts if you travel somewhere else

Auto-resumes watching on page reload if a watchlist was previously saved

Works correctly with Torn's single-page navigation (no full reload needed)

What this script does NOT do

It does not buy items or click any buttons automatically

It does not require a Torn API key

It does not send any data to external services

It does not modify or intercept Torn network requests

It only reads visible DOM content and adds display-only UI elements

Notes

Notifications require browser permission — you will be prompted the first time you click
Enable Notifications. If you previously denied permission, you will need to reset it
in your browser's site settings for torn.com.

The requireInteraction flag is set on notifications, which keeps them on screen
until you dismiss them on Chromium-based browsers (Chrome, Edge, Brave). On Firefox and Safari
the notification may auto-dismiss after a few seconds depending on your OS notification settings.

If items stop being detected after a Torn update, set DEBUG = true near the top
of the script and reload the page — the browser console will log exactly which selectors
matched (or didn't), making it straightforward to update.