Greasy Fork is available in English.

3DM论坛回复

点击回复按钮自动回复论坛帖子

// ==UserScript==
// @name         3DM论坛回复
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @license MIT
// @description  点击回复按钮自动回复论坛帖子
// @require      https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.slim.min.js
// @author       feirnova
// @match        *://bbs.3dmgame.com/thread*
// @match        *://bbs.3dmgame.com/forum.php?mod=viewthread*
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACgFJREFUeF7tnV2oZWUdh5+56kZF0DDILgpFEpJKNAcElZouIuqi/CicMG+SlCARL4RwhLBCzGBIL8IMbwwUQqUgIxzUnFSmD1MQIxKxmwQ/kLk23jl7ez46Z85e+6zfu9e71rPgMKOu9Xv/7/P/P6x9jmevvQ8PCUhgRwL7ZCMBCexMQEGcDgmchICCOB4SUBBnQALLEfAOshw3r5oIAQWZSKPd5nIEFGQ5bl41EQIKMpFGu83lCCjIcty8aiIEFGQijXabyxFQkMW4nQbsn31dMvuz/DuPNgm8BhwBjgLHZl/b7kRBdm/w1cCdwCd2P9UzGiVQRLkHeHhr/Qqyc0c/BPwCONho0y27O4EiyFUbL1OQ7SGWu8W/uvP1ipEQ+MALBdm+o68DHxtJs91GdwJ3AIfKZQry//AOAzd1Z+oVIyNwGfCUgmzu6gHgiZE12u0sR+DPwAEF2QzPu8dywzTWq65VkM2t/QPwhbF22311JvBjBdnM7E3gzM4YvWCsBB5XkPXWlp9alZ9eeUhgTuDfCrI+DJcDTzobEthIQEEURCNOQkBBFERBFGShGfAl1kKYpnWSdxDvINOa+I67VRAF6Tgy0zpdQRRkWhPfcbcKoiAdR2ZapyuIgkxr4jvuVkEUpOPITOt0BVGQaU18x90qSH1BfgO8OHuqRsd2eTowf8LMl4AL0kQUpK4gVyhGryP9YPqhGgpST5BzfBBEr3LMw64DHogk+570TViTv2pyG/CjVBPN5XngogQH7yB17iD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4ohREQcY31T3uSEEUpMdxGl+UgijI+Ka6xx0piIL0OE7ji1IQBRnfVPe4IwXZIMg/gXN6hGtU+wTKRyCXT2Ga/FHeMPUw8PXJkxDAnED5ZdIzxLFGoAhyCLhdIBKYEXgKuEwa64Jc43vHHYcNBMpnhJfPCveY3UHOBJ4BzpOIBIBLgT9JYv0OUv52/U6fEy2oSRHw3Z9b2r3xM7AfBb4yqXFwsxsJ/A34jEg2E9goSPkvqQeRyX34BM4KPwhi+AS2qXCrIOWU8hSSu5rcjUUvQ+AocAA4vszFY79mO0HKni8G7gQ+P3YAE97fG8BPgfKAP48dCOwkyPz0/cAlQPmzfJ0tyWYJvAMcmf3Esjxlpny91+xuKhW+myCVynAZCQyTgIIMsy9WNRACCjKQRljGMAkoyDD7YlUDIaAgA2mEZQyTgIIMsy9WNRACCjKQRljGMAkoyDD7YlUDIaAgA2mEZQyTgIIMsy9WNRACCjKQRljGMAn8Dwu4ZAWqC1OdAAAAAElFTkSuQmCC
// @grant        none
// ==/UserScript==
(function ($) {
    'use strict';
    const _$ = $.noConflict()
    const reply = () => {
        const tiz = _$('.t_f')
        const tl = tiz.length
        let rep_txt = ''
        if (tl > 5) {
            const rn = Math.floor(1 + Math.random() * (tl - 1))
            rep_txt = tiz[rn].innerText.replace('\n', '')
        } else {
            const reply_arr = ['谢谢分享,很有用!', '非常感谢', '继续加油,支持', '同意,确实是这样', '我会认真阅读这个帖子的', '6666666666666666666666', '顶顶顶顶顶顶', '111111111111111111111111111111', '任务回复~任务回复~任务回复~111', '支持支持支持支持支持支持支持支持支持支持支持', '看起来还不错啊', '看看有多少人参加']
            const rn = Math.floor(Math.random() * reply_arr.length)
            rep_txt = reply_arr[rn]
        }
        _$('#fastpostmessage').text(rep_txt)
        document.getElementById('fastpostsubmit').click()
    }
    const loadUI = () => {
        const el = _$(`<div id="r-box" style="height:22px;width:300px;z-index:9999999;position:absolute;top:5px;left:230px;padding-top:4px"><btn id="rep_tie" style="color:red;cursor:pointer">回帖</btn></div>`);
        el.children('btn').click(reply);
        _$('body').append(el);
    }

    try {
        loadUI()
    } catch (e) {
    }
})(jQuery);