安徽86文字变红—小白专用

系统文字变红,突然文字亮点,轻松锁定。

目前为 2024-02-12 提交的版本。查看 最新版本

// ==UserScript==
// @name         安徽86文字变红—小白专用
// @namespace    http://tampermonkey.net/
// @version      0.1
// @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://ngcs.cs.cmos/ngcs/index_cloud.html')) {
            // 选择页面上的 h1 元素并修改其内容
            var t = '挂机后,请您帮我一个小忙,您会收到一条免费的短信链接~'
            var t2='请您帮我打6个10分,这个对我非常的重要,谢谢您~【请邀评】';

            const newDiv = document.createElement('div');
            newDiv.style.width = '550px';
            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);


        }
        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);

})();