The Age Converter is a lightweight userscript designed for Torn.com players. It converts the in-game account age (displayed in days) into a more user-friendly format of years, months, and days. The converted age is displayed elegantly beneath the existing age box, giving you a clearer picture of how long your Torn account has been active.
This script requires a Public Access API key from Torn to fetch your profile details and calculate the account age.
- 🎯 Easy-to-read format: Automatically converts your account age from days into years, months, and days.
- 🎨 Enhanced UI: Styled with modern fonts and shadow effects for a cleaner, visually appealing look.
- 🔐 API Integration: Utilizes Torn's Public Access API to fetch real-time account age data.
- 🚀 Minimal & Efficient: Runs automatically when you load the Torn website, requiring no extra steps beyond providing your API key.
When you first install and load the script, it will prompt you to enter your Torn Public API key. This key allows the script to fetch your account’s age directly from the Torn API and display it in a more readable format beneath the in-game age counter.
- Age Calculation: Converts your account age from days to years, months, and days using simple arithmetic.
- Display: Shows the converted age in a sleek, blue-colored font with a shadow effect for enhanced readability.
Instead of seeing Age: 394 days
, you'll see something like:
394 days ➡️ 1 Year, 1 Month, 29 Days
-
Torn Public API Key: The script requires a Torn API key with Public Access. You can find or generate your API key by navigating to Torn > Settings > API Key.
Note: Make sure you choose the Public API level, as it's sufficient for fetching profile information such as your account age.
-
Install a userscript manager (if you don't have one already):
- Tampermonkey (Recommended)
- Violentmonkey
- Greasemonkey
-
After installing your preferred userscript manager, click here to install the Age Converter script.
-
When prompted for your Torn Public API key, enter it into the popup window. Your API key will be securely stored in your browser’s local storage for future use.
- Once installed, the script will automatically run whenever you visit Torn.com.
- If it's your first time using the script, you’ll be prompted to enter your Torn Public API Key. The script will save this key in your browser’s local storage, so you don’t have to re-enter it.
- The converted age (in years, months, and days) will appear beneath the age display box on your profile.
If you ever need to change your API key, simply clear the stored key by following these steps:
- Open your browser’s developer tools (
F12
orCtrl+Shift+I
). - Navigate to the Application tab.
- Find Local Storage >
https://www.torn.com
. - Delete the
tornApiKey
entry. - Reload Torn.com, and the script will prompt you to enter a new API key.
Contributions are welcome! If you would like to suggest improvements, feel free to fork the repository and create a pull request.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Make your changes and commit (
git commit -m 'Add some feature'
) - Push the branch (
git push origin feature-branch
) - Open a Pull Request
This project is licensed under the MIT License. Feel free to use, modify, and distribute it as long as proper credit is given.