Project Bunnycloak

Protect VTubers by removing location data from webpages, with visual watermark for status indication.

当前为 2025-07-11 提交的版本,查看 最新版本

// ==UserScript==
// @name         Project Bunnycloak
// @namespace    https://yourdomain.com
// @version      1.2
// @description  Protect VTubers by removing location data from webpages, with visual watermark for status indication.
// @author       Flatline
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    const locationWords = [
        "illinois", "california", "texas", "new york", "japan", "kyoto", "tokyo",
        "lat", "long", "latitude", "longitude", "IP", "ISP", "GeoIP", "timezone",
        "zip code", "area code", "your location", "based in", "gps", "hometown", "city of", "from"
    ];

    function redactText(text) {
        locationWords.forEach(word => {
            const regex = new RegExp(`\\b${word}\\b`, 'gi');
            text = text.replace(regex, '[REDACTED]');
        });
        return text;
    }

    function scrubNode(node) {
        if (node.nodeType === Node.TEXT_NODE) {
            node.textContent = redactText(node.textContent);
        } else {
            node.childNodes.forEach(scrubNode);
        }
    }

    function scanPage() {
        scrubNode(document.body);
    }

    // Initial scan
    window.addEventListener('load', () => {
        scanPage();
        injectWatermark();
    });

    // Observe dynamic content changes
    const observer = new MutationObserver(mutations => {
        mutations.forEach(mutation => {
            mutation.addedNodes.forEach(node => {
                if (node.nodeType === 1) {
                    scrubNode(node);
                }
            });
        });
    });
    observer.observe(document.body, { childList: true, subtree: true });

    // Optional fallback
    setInterval(scanPage, 5000);

    // 🐰 Inject Bunnycloak watermark
    function injectWatermark() {
        const style = document.createElement('style');
        style.innerHTML = `
            #bunnycloak-watermark {
                position: fixed;
                bottom: 10px;
                right: 10px;
                background: rgba(0, 0, 0, 0.6);
                color: #fff;
                padding: 6px 12px;
                font-size: 12px;
                font-family: monospace;
                border-radius: 8px;
                z-index: 999999;
                pointer-events: none;
                user-select: none;
            }
        `;
        document.head.appendChild(style);

        const watermark = document.createElement('div');
        watermark.id = 'bunnycloak-watermark';
        watermark.innerText = '🐰 Cloaked by Flatline';
        document.body.appendChild(watermark);
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址