NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Block Cbox Bot Chat // @namespace http://tampermonkey.net/ // @version 0.1 // @description Block bot chat // @license MIT // @author Bdizzle // @match https://*.cbox.ws/* // @icon https://www.google.com/s2/favicons?sz=64&domain=cbox.ws // @require http://code.jquery.com/jquery-3.4.1.min.js // @run-at document-end // @grant none // ==/UserScript== (function() { 'use strict'; var botmsgcount = 0; $('<div id="bottoggle" style="display: inline;font-size: xx-small;margin-left: 10px;">🤖Bot Filter: <span id="botstatus" style="color: red;">OFF</span></div>').insertAfter('#btnUser'); $('#bottoggle').click(function(){ var bstatus = $('#botstatus').text(); if(bstatus == 'OFF'){ $('#botstatus').css('color','green'); $('#botstatus').text('ON'); return; } if(bstatus == 'ON'){ $('#botstatus').css('color','red'); $('#botstatus').text('OFF'); return; } }); function main(){ var bstatustwo = $('#botstatus').text(); if(bstatustwo=='ON'){ $('.Bot').hide(); $('.body').each(function(){ if($(this).text().charAt(0)=='$'){ $(this).parent().hide(); } }); var oldcount = botmsgcount; botmsgcount = $('.Bot').length; if(botmsgcount > oldcount){ $('#messages').scrollTop($('#messages').get(0).scrollHeight); } } if(bstatustwo=='OFF'){ $('.Bot').show(); $('.body').each(function(){ if($(this).text().charAt(0)=='$'){ $(this).parent().show(); } }); } setTimeout(main,100); } setTimeout(main,100); })();