DH3 Brighter Kills

Just makes the "xx kills" text in monster log actually legible.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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.

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

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

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

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

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

// ==UserScript==
// @name         DH3 Brighter Kills
// @namespace    com.anwinity.dh3
// @version      1.0.1
// @description  Just makes the "xx kills" text in monster log actually legible.
// @author       Anwinity
// @match        dh3.diamondhunt.co
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    $(function() {
        const originalClicksItem = window.clicksItem;
        window.clicksItem = function(a) {
            originalClicksItem.apply(this, arguments);
            if(a=="combatLog") {
                let calls = 40;
                function waitUntilVisible() {
                    calls--;
                    let spans = $("#combat-combatLog-section table > tbody > tr:first-child > td:first-child span");
                    if(spans.length>0) {
                        spans.css("color", "silver");
                        setTimeout(()=>$("#combat-combatLog-section table > tbody > tr:first-child > td:first-child span").css("color", "silver"), 200);
                        setTimeout(()=>$("#combat-combatLog-section table > tbody > tr:first-child > td:first-child span").css("color", "silver"), 500);
                        setTimeout(()=>$("#combat-combatLog-section table > tbody > tr:first-child > td:first-child span").css("color", "silver"), 1000);
                    }
                    else {
                        if(calls>0) {
                            setTimeout(waitUntilVisible, 50);
                        }
                    }
                }
                waitUntilVisible();
            }
        }
    });
})();