Torn – Unique Outcome Detector (UID) + 5s Beep While Present

Beep every 5s while "unique outcome" is present on Torn crime pages, with a sound toggle (default OFF)

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
strongp
日安装量
2
总安装量
6
评分
0 0 0
版本
1.7.0
创建于
2025-11-21
更新于
2025-11-28
大小
4.5 KB
许可证
MIT
适用于

Torn – Unique Outcome Detector

This userscript monitors Torn crime pages and alerts you when the text “unique outcome” appears.

What it does

Scans the current Crimes page every 10 seconds

Optional sound alert (tiny “Enable sound” button appears once to satisfy browser audio policies)

Remembers your preference in localStorage so you only need to enable sound once

Lightweight: no frameworks, no external requests, @grant none

Works on
https://www.torn.com/page.php?sid=crimes*
(Automatically covers SPA fragments like #/shoplifting, #/larceny, etc.)

How to use

Install the script.

Open Torn → Crimes.

(Optional) Click Enable sound in the small pill at the bottom-right.

When “unique outcome” appears in the page text, you’ll see a console log and—if enabled—hear a short beep.

Permissions

@grant none (runs in the page context)

No network calls, no data collection

Notes / Tips

If you don’t hear audio, you likely didn’t click Enable sound yet or your browser blocked autoplay; click the button once to unlock.

You can move or restyle the button by editing the small CSS block in the script.

The scan interval is set to 10,000 ms; change SCAN_INTERVAL_MS if you want faster/slower checks.

Troubleshooting

Script not running? Make sure the URL is exactly under https://www.torn.com/page.php?sid=crimes….

Nothing detected? The script searches document.body.innerText for /unique outcome/i. If Torn changes wording, update TARGET in the script.

Console output helps: open DevTools → Console and look for [UID] … messages.

Changelog

1.1.0 — Added optional Enable sound button with persistent preference; minor logging tweaks.

1.0.1 — Reliable beep timing; simplified match to ?sid=crimes*.

1.0.0 — Initial release.

Compatibility

Chrome, Edge, Firefox with Tampermonkey

Desktop tested; mobile may require allowing audio on tap

Privacy

No tracking, analytics, or remote requests. Everything runs locally.

License
MIT

Tags
torn, game, notifier, alert, audio, quality-of-life, crimes, userscript