Automatically attempts to rejoin if a room is full.
当前为
// ==UserScript==
// @name Auto Rejoin
// @namespace https://greasyfork.org/users/945115
// @version 0.1
// @license GPL-3.0
// @description Automatically attempts to rejoin if a room is full.
// @author left paren
// @match https://bonk.io/gameframe-release.html
// @run-at document-end
// @grant none
// ==/UserScript==
var target = document.getElementById("sm_connectingWindow_text")
var observer = new MutationObserver(function(mutations) {
if (target.innerText.indexOf("room_full") != -1) {
document.getElementById("roomlistjoinbutton").click()
}
});
observer.observe(target, {
attributes: true,
childList: true,
characterData: true
});