豆豆聊天室外掛(取消髒話限制,快速發話)

本文介绍了一个用于取消Dodo聊天室脏话限制的脚本,通过修改变量和函数实现发送消息不受限制,并展示了如何使用Tampermonkey在Chrome浏览器中运行。
// ==UserScript==
// @name          plugin-dodo_chatroom
// @namespace     
// @description      Have fun in dodo chatroom
// @author        Jeremy huang
// @homepage      
// @include       *doo.idv.tw/*
// ==/UserScript==

var $;

// Add jQuery
(function(){
    if (typeof unsafeWindow.jQuery == 'undefined') {
        var GM_Head = document.getElementsByTagName('head')[0] || document.documentElement,
            GM_JQ = document.createElement('script');

        GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
        GM_JQ.type = 'text/javascript';
        GM_JQ.async = true;

        GM_Head.insertBefore(GM_JQ, GM_Head.firstChild);
    }
    GM_wait();
})();

// Check if jQuery's loaded
function GM_wait() {
    if (typeof unsafeWindow.jQuery == 'undefined') {
        window.setTimeout(GM_wait, 100);
    } else {
        $ = unsafeWindow.jQuery.noConflict(true);
     //   $( document ).ready(function() {
     //       console.log("DOM ready");
     //       letsJQuery();
     //   });
        letsJQuery();
    }
}

// All your GM code must be inside this function
function letsJQuery() {
    console.log ("Dodo chat room Script start...");
    

        window.parent.window.document.getElementsByTagName("frameset")[0].rows = "0,0,*";


    //取消髒話限制 modify variabl
    var rwscript = document.createElement("script");
    rwscript.type = "text/javascript";
    rwscript.textContent = "word_dirty = [];" //clean the array
    document.documentElement.appendChild(rwscript);
    rwscript.parentNode.removeChild(rwscript);
    //取消私下髒話檢查 modify function
    var scriptCode = new Array();
    scriptCode.push('function word_dirty_chk(s) {return s;}');
    scriptCode.push('function chkempty(s){return true;}');
    scriptCode.push('function disableCtrlKeyCombination(e){return true;}');
    scriptCode.push('function repd(stra) {return stra;}');
    scriptCode.push('function init(inp) {lock2 = 0;}');       
    scriptCode.push('function right(e) {return false;}');
    scriptCode.push('function adver_wait() {}');
    scriptCode.push('function chksays() {');
    scriptCode.push('document.c.lastmessno.value=parent.lastmessno_get();');
    scriptCode.push('document.c.towho.value=parent.towho_get();');
      scriptCode.push('document.c.towho_sex.value=parent.towho_sex_get();');
      scriptCode.push('document.c.says.value=document.c.says_temp.value;');
    scriptCode.push('document.c.says_temp.value=\'\';');
     scriptCode.push('says_last=document.c.says.value;');
    scriptCode.push('parent.private.scroll(0,parent.private.document.body.scrollHeight);');
    scriptCode.push('parent.a2.scroll(0,parent.a2.document.body.scrollHeight);');
      scriptCode.push('parent.says_focus();');
    scriptCode.push('return true;}');
    
    scriptCode.push('function speed() {');
    scriptCode.push('if(1 < "19")   {');
    scriptCode.push('timegoed=(new Date()).getTime();');
    scriptCode.push('bantd=bant*1000;');
    scriptCode.push('num=0;sec=1000;bant=0;lock=0;');
    scriptCode.push('count=0;timego=timegoed;sayed=document.forms[0].says_temp.value;}');
    scriptCode.push('if(parent.a1.tm) {clearTimeout(parent.a1.tm);}');
    scriptCode.push('chksays();}');
                 
  var script = document.createElement('script');
  script.innerHTML = scriptCode.join('\n');
  scriptCode.length = 0;                            // recover the memory we used to build the script
  document.getElementsByTagName('head')[0].appendChild(script); 

}

 請在Chrome上使用,且須裝Tampermonkey

http://userscripts.org/scripts/review/176637

转载于:https://www.cnblogs.com/bittorrent/p/3284703.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值