Auto Rejoin

Automatically attempts to rejoin when the room is full.

  1. // ==UserScript==
  2. // @name Auto Rejoin
  3. // @namespace https://gf.qytechs.cn/users/945115
  4. // @version 0.4
  5. // @license GPL-3.0
  6. // @description Automatically attempts to rejoin when the room is full.
  7. // @author left paren
  8. // @match https://bonk.io/gameframe-release.html
  9. // @run-at document-end
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. var target = document.getElementById("sm_connectingWindow_text")
  14.  
  15. let roompass = ""
  16.  
  17. var observer = new MutationObserver(function(mutations) {
  18. if (/room_full|no_client_entry/.test(target.innerText)) {
  19. roompass = document.getElementById("roomlistjoinpasswordtext").value
  20. setTimeout(()=>{
  21. document.getElementById("sm_connectingWindowCancelButton").click()
  22. setTimeout(()=>{
  23. document.getElementById("roomlistjoinbutton").click()
  24. setTimeout(()=>{
  25. if (document.getElementById("roomlistjoinpasswordwindowcontainer").style.visibility == "visible") {
  26. document.getElementById("roomlistjoinpasswordtext").value = roompass
  27. setTimeout(()=>{document.getElementById("roomlistpassjoinbutton").click()}, 100)
  28. }
  29. }, 1)
  30. }, 1)
  31. }, 1)
  32. }
  33. });
  34.  
  35. observer.observe(target, {
  36. attributes: true,
  37. childList: true,
  38. characterData: true
  39. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址