Terrorbytes – Elimination Icon

Elims icon

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         Terrorbytes – Elimination Icon
// @namespace    https://torn.com/
// @version      1.5
// @match        https://www.torn.com/*
// @grant        none
// @description  Elims icon
// ==/UserScript==

(function () {
    "use strict";

    const ICON_URL = "https://www.torn.com/images/v2/competition/elimination/team-icons/terror-bytes-dark.svg";
    const LINK_URL = "https://www.torn.com/page.php?sid=competition";

    function injectIcon() {
        const ul = document.querySelector("ul.status-icons, ul[class*='status-icons']");
        if (!ul) return;

        if (document.getElementById("custom-comp-icon")) return;

        const li = document.createElement("li");
        li.id = "custom-comp-icon";

        // Bigger icon (adjust size here)
        li.style.backgroundImage = `url("${ICON_URL}")`;
        li.style.backgroundSize = "22px 22px";   // <<< make bigger here
        li.style.backgroundRepeat = "no-repeat";
        li.style.backgroundPosition = "center";

        const a = document.createElement("a");
        a.href = LINK_URL;
        a.title = "Competition";
        a.classList.add("noOnline");

        li.appendChild(a);
        ul.appendChild(li);
    }

    // Remove green dot
    const style = document.createElement("style");
    style.textContent = `
        .status-icons li a.noOnline:after {
            display: none !important;
            content: none !important;
        }
    `;
    document.head.appendChild(style);

    const observer = new MutationObserver(injectIcon);
    observer.observe(document.body, { childList: true, subtree: true });

    injectIcon();
})();