您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
系统文字变红,突然文字亮点,轻松锁定。
当前为
// ==UserScript== // @name 安徽86文字标红一键办理 // @namespace http://tampermonkey.net/ // @version 0.4 // @description 系统文字变红,突然文字亮点,轻松锁定。 // @author You // @match http://ngcs.cs.cmos/ngcs/index_cloud.html // @match http://ngbusi-ah.cs.cmos/ngbusi_ah/src/modules/busi/*/*_main.html // @exclude http://ngbusi-ah.cs.cmos/ngbusi_ah/src/modules/busi/busi298/busi298_main.html // @icon https://www.google.com/s2/favicons?sz=64&domain=cs.cmos // @grant GM_setValue // @grant GM_getValue // ==/UserScript== //http://ngbusi-ah.cs.cmos/ngbusi_ah/src/modules/busi/busi298/busi298_main.html (function() { 'use strict'; function go(){ // 获取当前页面的 URL const currentUrl = window.location.href; console.log(currentUrl); if (currentUrl.includes('http://ngbusi-ah.cs.cmos/ngbusi_ah/src/modules/busi/busi154/busi154_main.html')) { // 假设multiLineString包含了你想要处理的数据 var multiLineString = `【热门推荐】1500积分兑换100分钟通话-当月使用到月底|s4622ActList:积分兑换业务营销活动(2024年)|s4622MeanList:1500积分兑换100分钟语音包|s4622ContentDisplay:100分钟语音包(积分兑换)(必选) 【热门推荐】2100积分兑换2个G流量-当月使用到月底|s4622ActList:积分兑换流量包活动(2024年)|s4622MeanList:2100积分兑换2GB流量加油包|s4622ContentDisplay:2GB流量加油包(积分兑换)(必选) 【热门推荐】3000积分兑换5个G流量-当月使用到月底|s4622ActList:积分兑换流量包活动(2024年)|s4622MeanList:3000积分兑换5GB流量加油包|s4622ContentDisplay:5GB流量加油包(积分兑换)(必选) 2000积分兑换10个G流量-次月生效-赠送1个月|s4622ActList:积分兑换流量包活动(2024年)|s4622MeanList:2000积分兑换10GB特惠流量包*1个月,次月生效|s4622ContentDisplay:5G特惠流量包(20元10GB)(必选) 1500积分兑换5个G流量-次月生效-赠送1个月|s4622ActList:积分兑换流量包活动(2024年)|s4622MeanList:1500积分兑换5GB特惠流量包*1个月,次月生效|s4622ContentDisplay:5G特惠流量包(15元5GB)(必选) 4000积分兑换10个G流量-次月生效-赠送2个月|s4622ActList:积分兑换流量包活动(2024年)|s4622MeanList:4000积分兑换10GB特惠流量包*2个月,次月生效|s4622ContentDisplay:5G特惠流量包(20元10GB)(必选) 全省大众市场积分购1元享流量包(2年期)QHY|s4622ActList:全省大众市场积分购1元享流量包(2年期)QHY|s4622MeanList:1积分购国内1GB*24月+流量包优惠1元*1月|s4622ContentDisplay:新版轻合约流量包(国内1GB,24个月)(必选) 全省大众市场1元享流量包(2年期)QHY|s4622ActList:全省大众市场1元享流量包(2年期)QHY|s4622MeanList:(当月生效)月享国内1G流量24个月|s4622ContentDisplay:新版轻合约流量包(国内1GB,24个月)(必选) 全省大众市场积分购1元享语音包(2年期)QHY|s4622ActList:全省大众市场积分购1元享语音包(2年期)QHY|s4622MeanList:1积分购国内50分钟*24月+语音包优惠1元*1月|s4622ContentDisplay:新版轻合约通话包(国内50分钟,24个月)(必选) 全省大众市场1元享语音包(2年期)QHY|s4622ActList:全省大众市场1元享语音包(2年期)QHY|s4622MeanList:(当月生效)月享国内50分钟通话,24个月|s4622ContentDisplay:新版轻合约通话包(国内50分钟,24个月)(必选) `; // 分割多行字符串为行数组 var lines = multiLineString.split('\n'); // 创建新的ul元素,并设置一个id以便后续查找 var newUl = document.createElement('ul'); newUl.id = 'dynamicUl'; newUl.className = 'ued-slide-check'; // 处理每行字符串 lines.forEach(function (line) { // 分割行为多个部分 var parts = line.split('|'); if (parts.length > 1) { // 确保行包含多个部分 // 创建li元素并设置其内容为第一个部分 var li = document.createElement('li'); li.style.color = 'red'; var span = document.createElement('span'); span.textContent = parts[0]; // 显示"操作指南"或其他指令文本 li.appendChild(span); // 将整行作为mydata属性存储 li.setAttribute('mydata', line); // 为li元素添加点击事件监听器 li.addEventListener('click', function () { // 获取当前li的mydata属性 var mydata = this.getAttribute('mydata'); // 分割mydata字符串,跳过第一个部分(操作指南文本) var commands = mydata.split('|').slice(1); console.log(commands); // 依次处理每个命令 commands.forEach(function (command, index) { //console.log(index); setTimeout(function () { var [divId, liContent] = command.split(':'); var targetDiv = document.getElementById(divId); var have=false; if (targetDiv) { var targetList = targetDiv.querySelectorAll('li'); targetList.forEach(function (li) { // console.log(li.textContent); if (li.textContent.includes(liContent)) { console.log(`模拟点击 '${liContent}'`); // 演示用 // 实际应用中可以在这里触发点击事件或其他操作 have=true; li.click(); } }); //s4622ActList if(index==0 && !have) { // 触发点击事件 document.querySelector("#s4622ActList > p > a").click(); // 使用setTimeout延迟后续操作,以等待页面加载或处理 setTimeout(function() { // 获取目标div,此时页面应该已经响应了之前的点击 var targetDiv = document.querySelector("#moreActList"); console.log(targetDiv); // 如果targetDiv存在,则继续执行后续操作 if(targetDiv) { var targetList = targetDiv.querySelectorAll('li'); console.log(targetList); // 遍历列表项 targetList.forEach(function (li) { // 检查列表项文本是否包含特定内容 if (li.textContent.includes(liContent)) { console.log(`模拟点击 '${liContent}'`); // 演示用 // 实际应用中可以在这里触发点击事件或其他操作 li.click(); // 如果有特定的操作需要在点击后的一段时间执行,可以在这里使用setTimeout setTimeout(function() { selectSingelActFromMore(); }, 500); // 延迟500毫秒 } }); } }, 500); // 延迟500毫秒以等待页面响应点击事件 } if(index==1 && !have) { // 触发点击事件 document.querySelector("#s4622MeanList > p > a").click(); // 使用setTimeout延迟后续操作,以等待页面加载或处理 setTimeout(function() { // 获取目标div,此时页面应该已经响应了之前的点击 var targetDiv = document.querySelector("#moreMeansList"); console.log(targetDiv); // 如果targetDiv存在,则继续执行后续操作 if(targetDiv) { var targetList = targetDiv.querySelectorAll('li'); console.log(targetList); // 遍历列表项 targetList.forEach(function (li) { // 检查列表项文本是否包含特定内容 if (li.textContent.includes(liContent)) { console.log(`模拟点击 '${liContent}'`); // 演示用 // 实际应用中可以在这里触发点击事件或其他操作 li.click(); // 如果有特定的操作需要在点击后的一段时间执行,可以在这里使用setTimeout setTimeout(function() { selectSingelMeanFromMore(); }, 500); // 延迟500毫秒 } }); } }, 500); // 延迟500毫秒以等待页面响应点击事件 } // 使用setTimeout来实现等待0.5秒(500毫秒) setTimeout(function() { // 这里的代码会在等待0.5秒后执行 if(index == 2) { submitMarketOrder(); } }, 500); // 500毫秒后执行函数 } }, 1000 * index*2); // 每间隔1秒处理一个命令 }); }); // 将li元素添加到ul中 newUl.appendChild(li); } }); // 获取#actCategory元素 var actCategory = document.querySelector('#actCategory'); // 将新的ul元素添加到#actCategory的下方 if (actCategory) { actCategory.parentNode.insertBefore(newUl, actCategory.nextSibling); } } // 对第一个网址执行操作 if (currentUrl.includes('http://ngcs.cs.cmos/ngcs/index_cloud.html')) { // 选择页面上的 h1 元素并修改其内容 var t = '挂机后,请您帮我一个小忙,您会收到一条免费的短信链接~' var t2='请您帮我打6个10分,这个对我非常的重要,谢谢您~【请邀评】'; const newDiv = document.createElement('div'); newDiv.style.width = '600px'; newDiv.style.height = '50px'; newDiv.style.position = 'fixed'; newDiv.style.top = '0'; newDiv.style.left = '0'; newDiv.style.backgroundColor = 'white'; newDiv.style.zIndex = '1000'; newDiv.style.padding = '10px'; // 创建一个新的 h1 元素并设置其文本和样式 const newH1 = document.createElement('h2'); newH1.textContent = t; newH1.style.color = 'red'; const newH2 = document.createElement('h2'); newH2.textContent = t2; newH2.style.color = 'red'; // 将新 h1 元素添加到新 div 中 newDiv.appendChild(newH1); newDiv.appendChild(newH2); // 将新 div 元素添加到 body 的开头 document.body.insertBefore(newDiv, document.body.firstChild); // 确保newDiv的position属性为relative,以便于内部元素可以相对于它定位 newDiv.style.position = 'relative'; // 创建按钮元素 const refreshButton = document.createElement('button'); refreshButton.textContent = '刷新'; // 设置按钮的样式为绝对定位,相对于newDiv的右下角 refreshButton.style.position = 'absolute'; refreshButton.style.bottom = '10px'; // 距离newDiv底部的距离 refreshButton.style.right = '10px'; // 距离newDiv右侧的距离 refreshButton.style.zIndex = '10'; // 添加点击事件监听器 refreshButton.addEventListener('click', function() { // 定位到特定的iframe并尝试刷新 var iframe = document.querySelector("#mainBody > div.main > div > div > div > div > div.uiTabBody > div.uiTabItemBody.selected > iframe"); if (iframe) { // 强制从服务器加载 iframe.src=iframe.src; } else { console.log("未能找到指定的iframe"); } }); // 将按钮添加到newDiv内部 newDiv.appendChild(refreshButton); } if (currentUrl.includes('http://ngbusi-ah.cs.cmos/ngbusi_ah/src/modules/busi/')) { //如下是配置信息 const configData = `全省大众市场积分购1元享语音包(2年期)QHY 全省大众市场积分购1元享流量包(2年期)QHY 积分兑换 全省2023年大众市场流量套包活动 全省2023年大众市场套餐焕新享流量活动 2023年优选客户专享特惠政策二 全省2023年优选客户专享特惠政策一 全省2023年大众市场套餐焕新专项活动二 全省2023年三季度优选客户专享政策二 全省2023年大众市场套餐焕新活动(升99档位) 全省2023年大众市场套餐焕新活动(升129档位) 全省2023年大众市场套餐焕新活动(升159档位) 全省2023年大众市场套餐焕新活动(升199档位) 全省2023年大众市场套餐焕新活动(升239档位) 2024年1季度存量用户服务保有对标G网活动 2024年5G特惠流量权益包(10GB,助学版本) 宿州2023年美好乡村惠民G网活动(次月) G网活动 轻合约 一线降档 主套餐 存量升档 合肥2024年高星用户G网专项活动(合肥客服专享) G网专项活动 2023年惠生活黄金会员初级版首月1元 升档优惠 积分兑换业务营销活动(2024年) 到期接续 主套优惠活动 特邀用户 重点用户营销 特邀客户 5G迁转活动 焕新活动 省公司乡村振兴活动 全省大众市场套餐升级活动(CT) 积分兑换流量包活动(2024年) 【5G生活节专享】全省2023年大众市场重点流量包 全省2023年专项客户享5G特惠包 合肥2023年12月流量特惠营销活动 全省2023年特邀用户套餐升级享流量活动 2023年宽带到期续费活动 24年两节第二条宽带营销活动 公司统一运营 合肥2024年重点客户到期接续-呼入侧 2024年合肥存量客户融合升档优惠活动 套餐升档 套餐优惠 G网服务处理专项营销活动 回馈礼包升档活动 合肥2024年高星用户G网专项活动(合肥客服部专享) 合肥2023年存量客户融合套餐升档优惠活动 2024年大众市场流量包活动 全省2023年特邀客户套餐5折活动 全省2023年大众市场 全省大众市场1元享流量包(2年期)QHY 【热线专享】全省2023年大众市场流量包活动 全省大众市场积分购1元享语音包(2年期)QHY 全省大众市场流量包活动(CT) 两节套餐焕新活动 宽带高危风险保有专项活动 宽带不变更套餐续费 全省大众市场套餐升级活动(CT二) 合肥2023年12月流量特惠营销活动 全省大众市场升级芒果卡套餐活动(CT) 全省2024年两节目标客户办芒果卡活动 2024年1季度存量用户服务保有对标活动 全省2024年两节老旧套餐升芒果卡活动 两节套餐焕新活动 宽带续费活动 到期续费优惠活动 风险保有专项活动 芒果卡活动 接续优惠活动 12月重点客户专属流量保有活动(热线) 12月重点客户专属流量保有活动(热线专享) 全省大众市场1元享语音包(2年期)QHY`; // 创建浮动窗口和文本框 const floatWindow = document.createElement('div'); const textArea = document.createElement('textarea'); textArea.style.boxSizing = 'border-box'; // 边框和内边距包含在宽高内 textArea.style.width = '300px'; textArea.style.height = '400px'; // 设置浮动窗口的样式 floatWindow.style.position = 'fixed'; floatWindow.style.top = '30px'; // 调整位置以避免遮挡按钮 floatWindow.style.right = '10px'; floatWindow.style.zIndex = '1000'; floatWindow.style.display = 'none'; // 初始隐藏 floatWindow.style.backgroundColor = 'white'; floatWindow.style.border = '1px solid black'; floatWindow.style.padding = '10px'; // 添加文本框到浮动窗口 floatWindow.appendChild(textArea); document.body.appendChild(floatWindow); // 创建和添加显示/隐藏浮动窗口的按钮 const toggleButton = document.createElement('button'); toggleButton.textContent = '配置内容'; toggleButton.style.position = 'fixed'; toggleButton.style.top = '1px'; toggleButton.style.right = '10px'; toggleButton.style.zIndex = '1000'; // 设置按钮的背景颜色为黄色 toggleButton.style.backgroundColor = 'yellow'; toggleButton.addEventListener('click', () => { // 如果 floatWindow 现在是显示状态,保存 textArea 的内容 // if (floatWindow.style.display === 'block') { // GM_setValue('savedTextareaContent', textArea.value); // } // 首先切换 floatWindow 的显示状态 floatWindow.style.display = floatWindow.style.display === 'none' ? 'block' : 'none'; }); document.body.appendChild(toggleButton); const savedText =configData; //GM_getValue('savedTextareaContent'); if (savedText) { textArea.value = savedText; } // 周期性检查 setInterval(() => { const lines = textArea.value.split('\n'); document.querySelectorAll('li').forEach(li => { li.style.color = 'black'; }); document.querySelectorAll('li').forEach(li => { // 遍历每行文本 lines.forEach(line => { // 检查 li 的文本是否包含该行文本,或该行文本是否包含 li 的文本 let containsText = li.innerText.toLowerCase().includes(line.toLowerCase()) || line.toLowerCase().includes(li.innerText.toLowerCase()); // 如果找到匹配的文本,且颜色尚未设为红色,则设置为红色 if (containsText) { //console.log(li); li.style.color = 'red'; } }); }); }, 500); } } setTimeout(go, 5000); })();