Torn Profile Link Formatter

Adds a dark-mode 'Copy' button with a customizable settings menu next to a user's name.

当前为 2025-06-16 提交的版本,查看 最新版本

作者
Christopher Ebling (GNSC4)
评分
0 0 0
版本
1.3.6
创建于
2025-06-15
更新于
2025-06-16
大小
19.0 KB
许可证
暂无
适用于

Torn Profile Link Formatter


A simple and convenient userscript that adds a Copy button and a customizable Settings menu to Torn.com profile pages. This tool makes it easy to quickly generate and copy a pre-formatted link of a user's profile, including optional battle stats from TornStats, perfect for sharing in chat or forums.


Features

  • One-Click Copying: Adds a "Copy" button right next to the user's name for instant access.
  • TornStats API Integration: Securely add your TornStats API key to include a player's battle stats in the copied message.
  • Customizable Format: Use the settings menu (⚙️) to choose which links and information you want to include:
    • Linked user's name and ID (e.g., Username [12345])
    • Attack Link
    • Activity Status (🟢 Online, 🟡 Idle, ⚫ Offline)
    • Faction Link
    • Company Link
    • Time Remaining in hospital
    • Release Time (TCT) from hospital
    • Battle Stats (Strength, Defense, Speed, Dexterity, Total, and age of spy)
  • Intelligent Detection: The script automatically detects if a user is in a faction, company, or hospital, and only shows the relevant options.
  • Live UI Updates: The "Battle Stats" option enables instantly when you enter an API key, no refresh needed.
  • Fast & Efficient: Uses a MutationObserver to ensure the buttons appear instantly as the page loads, with no noticeable delay.

How to Use

  1. Navigate to any user's profile page on Torn.com.
  2. You will see a Copy button and a ⚙️ (settings) icon appear next to the user's name.
  3. (Optional) Get Battle Stats:
    • Click the ⚙️ icon to open the settings menu.
    • Enter your TornStats API key in the provided field. You can get your key from the TornStats Settings page.
    • Check the "Battle Stats" box to enable it.
  4. Customize your preferences in the settings menu. Your choices are saved automatically.
  5. Click the "Copy" button to instantly copy the formatted string to your clipboard.

Example Output

With all options enabled, the copied text will look something like this:


🟢 <a href="...">Username [1234567]</a> - <a href="...">Attack</a> - (In hospital for 1h 5m | Out at 07:37:16 TCT) - (Str: 1.21B | Def: 1.22B | Spd: 1.13B | Dex: 1.39B | Total: 4.96B | Spy: 3 hours ago)

Feedback & Issues


If you encounter any bugs, have suggestions for new features, or need help, please feel free to leave feedback on the Greasy Fork page. Please include as much detail as possible, such as the browser you are using and any errors that appear in the developer console (F12).