Create Full Room

Room of 8 players in 1 click.

当前为 2022-11-24 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Create Full Room
// @namespace    createfullroomforbonk.io
// @version      1
// @description  Room of 8 players in 1 click.
// @author       Helloim0_0, (Bonk Commands)
// @match        https://bonk.io/*
// @run-at       document-idle
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    if(document.getElementById("maingameframe").contentDocument.getElementById("classic_mid_fullroombutton") == null){
        document.getElementById("maingameframe").contentDocument.getElementById("roomlistrefreshbutton").click();
        var fullroombutton = document.getElementById("maingameframe").contentDocument.createElement("div");
        fullroombutton.id = "classic_mid_fullroombutton";
        fullroombutton.classList.value = "brownButton brownButton_classic classic_mid_buttons";
        fullroombutton.textContent = "CREATE FULL ROOM";
        fullroombutton.addEventListener("click", function(){
            document.getElementById("maingameframe").contentDocument.getElementById("roomlistcreatewindowmaxplayers").value = 8;
            document.getElementById("maingameframe").contentDocument.getElementById("roomlistcreatecreatebutton").click();
            document.getElementById("maingameframe").contentDocument.getElementById("classic_mid_customgame").click();
        });
        document.getElementById("maingameframe").contentDocument.getElementById("classic_mid").insertBefore(fullroombutton,document.getElementById("maingameframe").contentDocument.getElementById("classic_mid_customgame"))
    }

})();