// ==UserScript== // @name Bonk Clear Chat // @version 1.1 // @author Salama // @description Adds a button to clear chat // @match https://*.bonk.io/gameframe-release.html // @run-at document-start // @grant none // @supportURL https://discord.gg/Dj6usq7ww3 // @namespace https://greasyfork.org/users/824888 // @license MIT // @downloadURL none // ==/UserScript== (function() { 'use strict'; let button = document.createElement('div'); document.getElementById("newbonklobby_chatbox").getElementsByClassName("newbonklobby_boxtop newbonklobby_boxtop_classic")[0].appendChild(button); button.outerHTML = `
CLEAR
`; document.getElementById("clearchatbutton").addEventListener('click', () => { for(let msg of [...document.getElementById("newbonklobby_chat_content").children].concat([...document.getElementById("ingamechatcontent").children])) { msg.remove(); } }); console.log("Clear chat button added"); })();