Torn Overseas Bounty Highlighter

Color RED bounty players

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Torn Overseas Bounty Highlighter
// @namespace    http://tampermonkey.net/
// @version      2.2
// @description  Color RED bounty players
// @author       SuperGogu[3580072]
// @match        https://www.torn.com/index.php?page=people*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    function highlightBountyPlayers() {
        let listItems = document.querySelectorAll('.users-list li'); // Select all from users-list
        if (listItems.length === 0) {
            console.error("No elements found in .users-list");
            return;
        }

        listItems.forEach(listItem => {
            let bountyLink = listItem.querySelector('a[href^="/bounties.php?userID="]'); // Check if bounty

            if (bountyLink) {
                listItem.style.backgroundColor = 'red'; // Set player on RED
                listItem.style.color = 'white'; // White text
            }
        });
    }

    window.onload = function() {
        highlightBountyPlayers();
    };
})();