您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Agrega al chat de kongregate.com el comando /mute [-l] <nombres separados por espacio>.
// ==UserScript== // @name /mute y /unmute // @namespace Klatu // @version 3 // @description Agrega al chat de kongregate.com el comando /mute [-l] <nombres separados por espacio>. // @author Klatu // @match http://www.kongregate.com/games/*/* // @grant none // ==/UserScript== document.observe('holodeck:ready', function() { holodeck.addChatCommand('mute', function(a, b){ var listar=false; b=b.split(' '); b.shift(); b.each(function(user){ const regex=/^[0-9a-zA-Z][\w]{3,15}$/; if(user==='-l'||user==='--list') listar=true; else if(regex.exec(user)!==null){ holodeck.addMuting(user); new Ajax.Request("/accounts/"+holodeck.username()+"/muted_users?username="+user+"&from_chat=true",{ asynchronous: !0, evalScripts: !0, method: "post" }); holodeck._active_dialogue.kongBotMessage(user+' muteado.'); } }); if(listar){ var msj='Muteaste a las siguientes cuentas: '; for(var user in holodeck._chat_window._mutings) if(holodeck._chat_window._mutings[user]) msj+=user+', '; msj=msj.substring(0, msj.length-2)+'.'; //elimina el último ', ' y agrega un '.' holodeck._active_dialogue.kongBotMessage(msj); } return!1; }); holodeck.addChatCommand('unmute', function(a, b){ var listar=false; b=b.split(' '); b.shift(); b.each(function(user){ const regex=/^[0-9a-zA-Z][\w]{3,15}$/; if(user==='-l'||user==='--list') listar=true; else if(regex.exec(user)!==null){ holodeck.removeMuting(user); new Ajax.Request("/accounts/"+holodeck.username()+"/muted_users/"+user+".chat",{ asynchronous: !0, evalScripts: !0, method: "delete" }); holodeck._active_dialogue.kongBotMessage(user+' desmuteado.'); } }); if(listar){ var msj='Muteaste a las siguientes cuentas: '; for(var user in holodeck._chat_window._mutings) if(holodeck._chat_window._mutings[user]) msj+=user+', '; msj=msj.substring(0, msj.length-2)+'.'; //elimina el último ', ' y agrega un '.' holodeck._active_dialogue.kongBotMessage(msj); } return!1; }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址