您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Easily ban hate raid accounts
当前为
// ==UserScript== // @name TwitchMassBan - Easily ban hate raid accounts // @description Easily ban hate raid accounts // @namespace https://github.com/victornpb/twitch-mass-ban // @version 0.4 // @match *://*.twitch.tv/* // @grant none // @run-at document-start // @homepageURL https://github.com/victornpb/twitch-mass-ban // @supportURL https://github.com/victornpb/twitch-mass-ban/issues // @contributionURL https://www.buymeacoffee.com/vitim // @grant none // @license MIT // ==/UserScript== (function() { var html = ` <div class="botban" style="position: fixed; bottom: 50px; left: 50px; z-index: 99999999; background-color:#311b92; color:white; border: 1px solid white; padding:5px;"> <div style="display: flex;"> <button class="clear">CLEAR</button> <button class="extract">GRAB USERNAMES</button> <button class="banAll" style="background: red;">BAN ALL</button> <span style="flex-grow: 1;"></span> <button class="closeBtn">X</button> </div> <br> <textarea placeholder="Usernames" style="font-family:monospace; width: 500px; height: 300px; white-space: nowrap;"></textarea> <style> .botban{ } .botban button{ border: 1px solid white; padding: .5em 1em; margin: 1px; } textarea{ background: var(--color-background-base); color: var(--color-text-base); padding: .5em; } </style> </div>`; var d = document.createElement("div"); d.innerHTML = html; var textarea = d.querySelector("textarea"); document.body.appendChild(d); textarea.focus(); const activateBtn = document.createElement('button'); activateBtn.innerHTML = 'MASSBAN'; activateBtn.style.cssText = ` font-weight: var(--font-weight-semibold); border-radius: var(--border-radius-medium); font-size: var(--button-text-default); height: var(--button-size-default); background-color: #e91e63; color: var(--color-text-button-primary); `; activateBtn.onclick = ()=>d.style.display=''; function appendActivatorBtn(){ const twitchBar = document.querySelector('[data-test-selector="chat-input-buttons-container"]'); if (twitchBar && !twitchBar.contains(activateBtn)) twitchBar.insertBefore(activateBtn, twitchBar.firstChild); } setInterval(appendActivatorBtn, 1E3); d.style.display = 'none'; d.querySelector(".closeBtn").onclick = () => d.style.display='none'; d.querySelector(".clear").onclick = function(){ textarea.value = ''; }; d.querySelector(".extract").onclick = function(){ let usernames = []; textarea.value.replace(/Thank you for following ([\w_]+) /g, (m,name)=>{ usernames.push(name); return ''; }); usernames = [... new Set(usernames)]; if(usernames) textarea.value = usernames.join('\n'); else textarea.value = 'No usernames found!' }; const delay = t=>new Promise(r=>setTimeout(r,t)); function sendMessage(msg){ const textarea = document.querySelector("[data-a-target='chat-input']"); const nativeTextAreaValueSetter = Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, "value").set; nativeTextAreaValueSetter.call(textarea, msg); const event = new Event('input', { bubbles: true}); textarea.dispatchEvent(event); document.querySelector("[data-a-target='chat-send-button']").click(); } d.querySelector(".banAll").onclick = async function(){ var lines = textarea.value.split(/\n/).map(t=>t.trim()).filter(Boolean); for(const line of lines){ sendMessage('/ban '+line); await delay(100); } textarea.value = ''; }; })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址