当前位置: 首页 > news >正文

Grok 账号管理 - 全自动保活神器

//==UserScript==// @name Grok 账号管理 - 全自动保活神器 v3.0(终极修复版) // @namespace http://tampermonkey.net/ // @version3.0// @description 精准点击你页面的真实保存按钮,永不失手 // @author 专治各种不灵 // @match https://grok.*/* // @grant GM_addStyle //==/UserScript==(function(){'use strict';GM_addStyle(`.grok-god-panel{position:fixed;top:80px;right:20px;width:400px;background:white;border:3px solid#409EFF;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,0.4);z-index:9999999;font-family:"Microsoft YaHei",Arial,sans-serif;}.grok-god-header{background:linear-gradient(135deg,#409EFF 0%,#67C23A 100%);color:white;padding:12px 16px;font-weight:bold;font-size:15px;cursor:move;border-radius:9px 9px 0 0;display:flex;justify-content:space-between;align-items:center;}.grok-god-body{padding:16px;}.grok-god-status{font-size:15px;text-align:center;font-weight:bold;margin-bottom:12px;color:#409EFF;}.grok-god-btn{padding:12px;border:none;border-radius:6px;cursor:pointer;font-weight:bold;font-size:14px;width:100%;margin:8px0;}.btn-start{background:#67C23A;color:white;}.btn-stop{background:#F56C6C;color:white;display:none;}.grok-god-log{background:#fafafa;border:1px solid #ddd;border-radius:6px;padding:10px;height:280px;overflow-y:auto;font-size:12px;font-family:monospace;margin-top:10px;}.log-success{color:#67C23A;}.log-info{color:#409EFF;}.log-warn{color:#E6A23C;}.log-error{color:#F56C6C;}.close-btn{background:rgba(255,255,255,0.3);border:none;color:white;width:28px;height:28px;border-radius:50%;font-size:20px;cursor:pointer;}`);letrunning=false;letlogBox=null;functionlog(msg,type='info'){if(!logBox)return;const div=document.createElement('div');div.className=`log-${type}`;div.textContent=`[${new Date().toLocaleTimeString()}]${msg}`;logBox.appendChild(div);logBox.scrollTop=logBox.scrollHeight;}// 终极精准点击保存按钮(适配你真实页面) // 精准点击保存按钮(改进版,支持多种按钮样式)functionclickSaveButton(){// 方式1:查找el-button--success类的按钮letbuttons=document.querySelectorAll('.el-dialog button.el-button--success');for(const btn of buttons){const span=btn.querySelector('span');if((span&&span.textContent.includes('保存'))||btn.textContent.includes('保存')){if(!btn.disabled&&btn.offsetParent!==null){btn.click();returntrue;}}}// 方式2:查找所有按钮中包含"保存"文字的 buttons=document.querySelectorAll('.el-dialog button, .el-dialog .el-button');for(const btn of buttons){const span=btn.querySelector('span');const text=span ? span.textContent:btn.textContent;if(text.includes('保存')&&!btn.disabled&&btn.offsetParent!==null){// 检查按钮是否可见且可点击 const rect=btn.getBoundingClientRect();if(rect.width>0&&rect.height>0){btn.click();returntrue;}}}// 方式3:使用更通用的选择器 const saveBtn=document.querySelector('.el-dialog__footer .el-button--primary')||document.querySelector('.el-dialog .el-button.el-button--primary');if(saveBtn&&!saveBtn.disabled){saveBtn.click();returntrue;}returnfalse;}asyncfunctionprocessRow(i, total){const rows=document.querySelectorAll('.el-table__body tr.el-table__row');if(i>=rows.length)return;const row=rows[i];row.scrollIntoView({behavior:"smooth", block:"center"});row.style.background='#e6f7ff';log(`正在处理第 ${i+1}/${total}个账号`);const editBtn=row.querySelector('button.el-button--primary');if(!editBtn||editBtn.disabled){log(`第 ${i+1}行编辑按钮不可用`,'warn');row.style.background='';return;}editBtn.click();// 等弹窗出现letdialogVisible=false;for(let t=0;t<60;t++){await new Promise(r=>setTimeout(r,100));if(document.querySelector('.el-dialog')){dialogVisible=true;break;}}if(!dialogVisible){log(`第 ${i+1}行弹窗未打开`,'error');row.style.background='';return;}// 最多等15秒,疯狂尝试点保存letsaved=false;letfoundButtons=false;for(let t=0;t<150;t++){// 每1秒检查一次按钮状态if(t %10===0){const buttons=document.querySelectorAll('.el-dialog button');if(buttons.length>0&&!foundButtons){foundButtons=true;log(`第 ${i+1}行找到 ${buttons.length}个按钮`);}}if(clickSaveButton()){log(`第 ${i+1}行保存成功!`,'success');saved=true;break;}await new Promise(r=>setTimeout(r,100));}if(!saved){if(!foundButtons){log(`第 ${i+1}行保存失败:未找到任何按钮`,'error');}else{log(`第 ${i+1}行保存失败:按钮不可点击`,'error');}}// 关闭弹窗 await new Promise(r=>setTimeout(r,1000));const closeBtn=document.querySelector('.el-dialog__close');if(closeBtn)closeBtn.click();row.style.background='';}asyncfunctionstart(){if(running)return;running=true;document.getElementById('startBtn').style.display='none';document.getElementById('stopBtn').style.display='block';log('Grok 全自动保活 v3.0 已启动(已完美适配你的页面)','success');while(running){const rows=document.querySelectorAll('.el-table__body tr.el-table__row');if(rows.length===0){log('未检测到账号,10秒后重试...','warn');await new Promise(r=>setTimeout(r,10000));continue;}log(`开始处理 ${rows.length}个账号`);for(let i=0;i<rows.length&&running;i++){await processRow(i, rows.length);if(running&&i<rows.length -1){for(let s=30;s>0&&running;s--){document.getElementById('status').textContent=`第${i+1}个完成,等待 ${s}...`;await new Promise(r=>setTimeout(r,1000));}}}if(running){log('本轮完成,休息10分钟...');document.getElementById('status').textContent='休息10分钟';for(let m=10;m>0&&running;m--){for(let s=59;s>=0&&running;s--){document.getElementById('status').textContent=`休息中 ${m}:${s.toString().padStart(2,'0')}`;await new Promise(r=>setTimeout(r,1000));}}}}}functionstop(){running=false;document.getElementById('startBtn').style.display='block';document.getElementById('stopBtn').style.display='none';document.getElementById('status').textContent='已停止';log('已手动停止','warn');}functioncreatePanel(){if(document.querySelector('.grok-god-panel'))return;const panel=document.createElement('div');panel.className='grok-god-panel';panel.innerHTML=`<divclass="grok-god-header"><span>Grok 保活神器 v3.0</span><buttonclass="close-btn">×</button></div><divclass="grok-god-body"><divclass="grok-god-status"id="status">按 Ctrl+Shift+G 呼出</div><buttonclass="grok-god-btn btn-start"id="startBtn">开始自动保活(每30秒一个)</button><buttonclass="grok-god-btn btn-stop"id="stopBtn">停止运行</button><divstyle="font-size:13px;color:#666;margin:12px 0;">已完美适配你的页面<br>精准点击真正的“保存”按钮</div><divclass="grok-god-log"id="grokLog"></div></div>`;document.body.appendChild(panel);logBox=document.getElementById('grokLog');// 拖拽 const header=panel.querySelector('.grok-god-header');letdragging=false, ox=0, oy=0;header.addEventListener('mousedown', e=>{if(e.target.classList.contains('close-btn'))return;dragging=true;ox=e.clientX - panel.offsetLeft;oy=e.clientY - panel.offsetTop;});document.addEventListener('mousemove', e=>{if(dragging){panel.style.left=(e.clientX - ox)+'px';panel.style.top=(e.clientY - oy)+'px';}});document.addEventListener('mouseup',()=>dragging=false);panel.querySelector('.close-btn').onclick=()=>panel.style.display='none';document.getElementById('startBtn').onclick=start;document.getElementById('stopBtn').onclick=stop;log('Grok 保活神器 v3.0 已加载成功!','success');log('按 Ctrl+Shift+G 随时呼出面板','info');}document.addEventListener('keydown', e=>{if(e.ctrlKey&&e.shiftKey&&e.key.toUpperCase()==='G'){e.preventDefault();createPanel();document.querySelector('.grok-god-panel').style.display='block';}});setTimeout(createPanel,2000);})();
http://www.cnnetsun.cn/news/22522.html

相关文章:

  • 师生交流论坛|基于springboot + vue师生交流论坛系统(源码+数据库+文档)
  • 二手商城|基于springboot + vue二手商城系统(源码+数据库+文档)
  • 20、帧缓冲区接口设计与 STBmenu 简易 UI 开发
  • 24、深入浅出:SNMP 实践指南
  • 高级前端 Input 公共组件设计方案(Vue3 + TypeScript)
  • 前后端HTTPS及证书配置完整流程
  • TIA博途虚拟机终极配置指南:V17+V16+V15.1全版本一键部署
  • 【开题答辩全过程】以 基于Java的人体骨骼健康知识普及系统为例,包含答辩的问题和答案
  • 企业微信开发总卡壳?试试cpolar,回调调试超顺畅
  • ChatPPT:国内综合实力最强的AI PPT工具
  • 测试经验,自动化测试的痛点+发展趋势,一篇带你上高速...
  • NetGuard实战指南:告别流量焦虑,让Android网络管理如此简单
  • 大厂已经不用人干活了?“AI中台+Agent”正在重塑商业规则
  • Qwen2.5-Omni全模态大模型:70亿参数重构人机交互范式
  • Morisawa BIZ UDGothic 字体使用指南:让文字表达更专业优雅
  • 量子化学:材料的电子态密度
  • 零基础也能做!用Qoder快速开发“技能五子棋”蹭热点项目
  • GitHub加速终极方案:告别龟速访问,体验丝滑编程
  • 【总结】【计组】【OS】页号、页框号、虚拟地址、物理地址、地址
  • 超细整理,性能测试如何做?怎么做?性能压力负载(汇总三)
  • 国外代理IP怎么选?4大标准帮你避坑选优
  • 艾体宝洞察 | 当供应链恶意代码会“二次来袭”:Shai-Hulud 事件下,为什么必须重新审视你的应用安全体系?
  • OpenHarmony环境搭建——02-JDK17安装教程
  • 艾体宝干货 |【Redis实用技巧#4】Redis分布式锁真的安全吗?可靠性深度剖析(Part 2)
  • 21-4. PLC的基本逻辑指令(置位,复位指令)
  • VueScan Pro:专业扫描仪增强软件,支持多品牌设备与高质量OCR识别
  • Kali 必备!Burp Suite 超全教程 网安新手必看
  • 60、深入理解与配置 SSH:安全远程访问的全面指南
  • 视频生成大模型Wan2.2开源:MoE架构重构创作生态,消费级显卡实现电影级视频生成
  • [HNCTF 2022 Week1]easync