// ==UserScript== // @name 易班帖子自动评论点赞 // @namespace https://wechatid.github.io/2024/11/06/Yiban-JSmonkey/ // @version 2.0 // @description 易班帖子自动评论点赞的脚本,完全自动获取网薪经验值。易班帖子自动评论点赞脚本,自动获取网薪和经验值 // @match https://s.yiban.cn/app/* // @exclude https://s.yiban.cn/app/383996/post-detail/wxnC9a90k2Bge27 // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_download // @license All rights reserved // ==/UserScript== (function () { "use strict"; let COMMENT_COUNTER = 0; // 评论次数 let msg_text; window.liked_count = 1; window.valid_liked_count = 1; let sever = 'http://47.112.3.177:8000'; // ============ 时间间隔与定时器状态配置 ============ const LIKE_MIN_GAP = 4000; // 点赞最小间隔(ms) const LIKE_MAX_GAP = 7000; // 点赞最大间隔(ms),随机抖动降低被风控识别的概率 const LIKE_TARGET = 35; // 有效点赞数阈值(valid_liked_count 初始为 1,对应 34 次真实点赞) const LIKE_MAX_FAIL = 5; // 连续扫描失败上限,超过则停止点赞 const COMMENT_GAP = 60000; // 评论基础间隔(ms) const COMMENT_JITTER = 5000; // 评论随机抖动上限(ms) const COMMENT_TARGET = 30; // 目标评论次数 const VERIFY_POLL = 100; // 验证码轮询频率(ms) const VERIFY_TIMEOUT = 10000; // 验证码轮询超时兜底(ms) let thumbTimer = null; // 点赞定时器引用 let likeScanFails = 0; // 点赞连续扫描失败计数 let lastListLen = 0; // 上一轮评论列表长度,用于修正索引漂移 let commentTimer = null; // 评论定时器引用 let countdownTimer = null; // 倒计时 UI 定时器引用 let lastSendAt = 0; // 上一次发送评论的时间戳 let commentRunning = false; // 评论执行锁,防止重入产生多条并行链路 let verifyTimeoutTimer = null; // 验证码轮询超时兜底定时器 const floatingWindowHTML = `