news 2026/4/16 15:02:30

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

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
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);})();
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/16 12:58:25

中国地形数据资源完整指南

中国地形数据资源完整指南 【免费下载链接】中国地形数据下载 本仓库提供了一份详细的中国地形数据文件&#xff0c;该文件可在ArcGIS软件中打开并进行进一步分析和可视化。中国地形地势西高东低&#xff0c;呈阶梯状分布&#xff1b;地形多种多样&#xff0c;山区面积广大。地…

作者头像 李华
网站建设 2026/4/16 13:57:58

25、SNMP实践入门与MIB设计指南

SNMP实践入门与MIB设计指南 1. SNMP设置值请求被拒的原因及解决办法 在进行SNMP操作时,可能会遇到代理拒绝请求的情况。比如设置配置文件如下: rocommunity public syslocation "the den" syscontact me@myaddr.com这里只设置了只读社区字符串,没有设置读…

作者头像 李华
网站建设 2026/4/15 8:21:37

Xray启动优化:三招让你的编辑器秒开如飞

Xray启动优化&#xff1a;三招让你的编辑器秒开如飞 【免费下载链接】xray An experimental next-generation Electron-based text editor 项目地址: https://gitcode.com/gh_mirrors/xray/xray 还在为Xray编辑器启动缓慢而烦恼吗&#xff1f;作为一名基于Electron的实验…

作者头像 李华
网站建设 2026/4/15 17:49:52

Swift富文本编辑器终极指南:RichTextKit快速上手

Swift富文本编辑器终极指南&#xff1a;RichTextKit快速上手 【免费下载链接】RichTextKit RichTextKit is a Swift-based library for working with rich text in UIKit, AppKit and SwiftUI. 项目地址: https://gitcode.com/gh_mirrors/ri/RichTextKit 在iOS和macOS应…

作者头像 李华
网站建设 2026/4/16 14:01:23

一致性模型终极评测指南:从理论到实战避坑

一致性模型终极评测指南&#xff1a;从理论到实战避坑 【免费下载链接】diffusers-cd_bedroom256_l2 项目地址: https://ai.gitcode.com/hf_mirrors/openai/diffusers-cd_bedroom256_l2 在AIGC技术飞速发展的今天&#xff0c;生成模型评估已成为验证算法性能的关键环节…

作者头像 李华