Bonk win changer

you can change the win system the text of win

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Bonk win changer
// @namespace    http://tampermonkey.net/
// @version      01
// @description  you can change the win system the text of win
// @author       emiya440
// @match        https://bonk.io/*
// @match        https://bonkisback.io/*
// @icon         https://greasyfork.org/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTQ0OTA0LCJwdXIiOiJibG9iX2lkIn19--c6b29b5a8bb41bba2de56956509004effc0a642d/image.png?locale=fr
// @grant        none
// @license MIT
// ==/UserScript==
const button = document.createElement("button");
button.id = "injector";
button.innerHTML = "Inject (when the game start)";
button.title = "not injected";
button.onclick = Inject;
button.style.position = "absolute";
button.style.left = "10px";
button.style.top = "10px";
document.body.appendChild(button);
const inpute = document.createElement("input");
inpute.id = "code";
inpute.type = "text";
inpute.value = "Gg";
inpute.style.position = "absolute";
inpute.style.right = "10px";
inpute.style.top = "10px";
document.body.appendChild(inpute);
function Inject() {
    button.textContent = "Wait...";
    button.title = "injected";

    const winshow = document.querySelector("#ingamewinner");
    if (winshow) {
        button.textContent = "Injected! (don't inject two times)";
        const intervalId = setInterval(() => {
            const targetNode = winshow.childNodes[5];
            if (targetNode) {
                targetNode.textContent = inpute.value;
            } else {
                console.log("Element not found. Stopping interval.");
                clearInterval(intervalId);
            }
        }, 30);
    } else {
        button.textContent = "No injected >:[";
    }
}