Greasy Fork

反诈

反诈,所有迈克摇全换

当前为 2023-07-29 提交的版本,查看 最新版本

// ==UserScript==
// @name         反诈
// @namespace    http://tampermonkey.net/
// @version      1.05
// @icon         https://jgxin.dextrousdream8.repl.co/logo.jpg
// @description  反诈,所有迈克摇全换
// @license MIT
// @author       Dextrousdream8
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 替换列表和目标URL
    var replacementList = [
        { content: /paste\/g2ahu6v3/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        { content: /https:\/\/fanhuishangyiye\.jiaobenzhuanyong/, targetURL: "javascript:history.back()" },
        { content: /BV1GJ411x7h7/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        { content: /av80433022/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        { content: /BV1va411w7aM/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        { content: /BV1BP4y1G78b/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        { content: /BV1mu411U7GU/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        { content: /BV1Px411w7FH/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        { content: /BV1Ti4y1f7td/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        { content: /av156766/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        { content: /id=5221167/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        { content: /milime\.top/, targetURL: "https://www.luogu.com.cn/paste/m7e0e5kz" },
        // 继续按需求添加更多替换项
    ];

    document.addEventListener('click', function(event) {
        var target = event.target;
        if (target.matches("a")) {
            var url = target.href;
            for (var i = 0; i < replacementList.length; i++) {
                var replacementItem = replacementList[i];
                if (replacementItem.content.test(url)) {
                    event.preventDefault();
                    window.location.href = replacementItem.targetURL;
                    break;
                }
            }
        }
    });
})();