Bonk.io Room hide function

Adds epic room hider

目前为 2024-08-01 提交的版本。查看 最新版本

// ==UserScript==
// @name         Bonk.io Room hide function
// @namespace    http://tampermonkey.net/
// @version      69
// @description  Adds epic room hider
// @author       Silly One
// @license      MIT
// @match        https://*.bonk.io/*
// @match        https://*.bonkisback.io/*
// @match        https://*.multiplayer.gg/*
// @grant        none
// ==/UserScript==

function filterRooms(s) {
    s = s.toLowerCase();
    let matches = el => el.children[0].textContent.toLowerCase().includes(s);
    $('#roomlisttable tr').each((i, el) => {
        if (s === "") {
            el.hidden = false;
        } else {
            el.hidden = matches(el);
        }
    });
}
inp = `<input type="text" id="roomHideInputBox" placeholder="Vanish Rooms.." style="
    float: right;
    padding: 2px 8px;
    margin: 5px 20px;
    border: 2px solid #006157;
    border-radius: 5px;
    font: large futurept_b1;
">`;
$('#roomlisttopbar').append(inp);
$('#roomHideInputBox').keyup(ev => filterRooms(ev.target.value));