Burning-Series Redirector

Redirect burning-series.io to bs.to and modify Google search results

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Burning-Series Redirector
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Redirect burning-series.io to bs.to and modify Google search results
// @author       2ndSky95
// @match        *://burning-series.io/*
// @match        *://www.google.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function redirectPage() {
        let newURL = window.location.href.replace('burning-series.io', 'bs.to');
        window.location.replace(newURL);
    }

    function modifyGoogleResults() {
        document.querySelectorAll('a').forEach(function(link) {
            if (link.href.includes('burning-series.io')) {
                // Ändere die URL im href-Attribut
                link.href = link.href.replace('burning-series.io', 'bs.to');

                // Ändere den sichtbaren Text des Links, falls es ein Textknoten ist
                let textNode = link.childNodes[0];
                if (textNode && textNode.nodeType === 3) { // Überprüfe, ob es sich um einen Textknoten handelt
                    textNode.nodeValue = textNode.nodeValue.replace('burning-series.io', 'bs.to');
                }

                // Füge eine optische Kennzeichnung hinzu (z.B. Änderung der Textfarbe zu rot)
                link.style.color = '#55ff55dd';
                link.style.textShadow = '3px 3px 6px #000000';

                // Füge ein Bild hinter der URL ein
                let imgHTML = '<img src="https://cdn.tsicons.com/icons/RJE5G5p9Xol3.png" style="height:16px;width:16px;margin-left:5px;">';
                link.insertAdjacentHTML('beforeend', imgHTML);
            }
        });
    }

    if (window.location.host.includes('burning-series.io')) {
        redirectPage();
    } else if (window.location.host.includes('www.google.com')) {
        setTimeout(modifyGoogleResults, 1000);
    }
})();