hubber larper

no limit to the larp

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @license MIT
// @name         hubber larper
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  no limit to the larp
// @author       You
// @match        *://hubber.cc/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    const OLD_NAME = "00";
    const NEW_NAME = "0";
    const STAT_1 = "0";
    const STAT_2 = "0";

    function applyOverrides() {
        const usernames = document.querySelectorAll('span.font-medium.hover\\:underline.cursor-pointer');
        usernames.forEach(user => {
            if (user.innerText.trim() === OLD_NAME) {
                user.innerText = NEW_NAME;
            }
        });

        const stat1 = document.querySelector('div.text-sm.font-medium.text-white.truncate');
        if (stat1 && (stat1.innerText === OLD_NAME || stat1.innerText === "00")) {
            stat1.innerText = STAT_1;
        }

        const stat2 = document.querySelector('span.text-sm.text-white.flex-1.truncate.font-medium');
        if (stat2 && (stat2.innerText === OLD_NAME || stat2.innerText === "00")) {
            stat2.innerText = STAT_2;
        }
    }

    const observer = new MutationObserver(() => {
        applyOverrides();
    });

    if (document.body) {
        observer.observe(document.body, { childList: true, subtree: true });
        applyOverrides();
    }
})();