Torn Profile Link Formatter

Adds a copy button next to user names on profile, faction, and ranked war pages for easy sharing.

Author
Christopher Ebling (GNSC4)
Daily installs
0
Total installs
4
Ratings
0 0 0
Version
1.6.6
Created
2025-06-15
Updated
2025-06-17
Size
35.5 KB
License
N/A
Applies to

Torn Profile Link Formatter


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


Features

  • Multi-Page Support: Works on full profile pages, faction member lists, ranked war pages, and mini-profiles.
  • 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, a faction page, or a ranked war list on Torn.com.
  2. You will see a Copy button and a ⚙️ (settings) icon appear next to a user's name on their profile page. On lists and mini-profiles, a small 📄 icon will appear.
  3. (Optional) Get Battle Stats:
    • Click the ⚙️ icon on any full profile page 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 and will apply to all copy buttons.
  5. Click the "Copy" or 📄 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).