Remix.run Logo
dheera 3 days ago

    setTimeout(() => {

        // fuck up all future javascripts

        setTimeout = setInterval = requestAnimationFrame = () => {};
        Element.prototype.appendChild = () => { throw new Error("Blocked"); };
        document.addEventListener = () => {};
        window.addEventListener = () => {};
        Object.defineProperty(document, "readyState", { get: () => { throw new Error("No JS"); } });
        document.write = () => {};

        // fuck up canvas
        if(window.HTMLCanvasElement) HTMLCanvasElement.prototype.getContext=()=>null; 

        // fuck up webgl
        if(window.WebGLRenderingContext) window.WebGLRenderingContext.prototype.getParameter=function(){e=>{throw new Error("Blocked")}};

        // fuck up webgl2
        if(window.WebGL2RenderingContext) window.WebGL2RenderingContext.prototype.getParameter=function(){e=>{throw new Error("Blocked")}};

        // fuck up websockets
        window.WebSocket=function(){e=>{throw new Error("Blocked")}}; window.EventSource=function(){e=>{throw new Error("Blocked")}};

        // fuck up popups
        window.open=()=>null;

        // ...

    }, 500);
vhcr 3 days ago | parent | next [-]

    const iframe = document.createElement("iframe");
    document.body.append(iframe);
    iframe.contentWindow...
joquarky 2 days ago | parent [-]

    javascript:(function () {
        const rm = () => document.querySelectorAll('iframe')
            .forEach(f => f.remove());
        let timeout;
        const debouncedRm = () => {
            clearTimeout(timeout);
            timeout = setTimeout(rm, 100);
        };
        rm();
        new MutationObserver(debouncedRm)
            .observe(document.body, {
                childList: true, subtree: true
            });
    })();
cookiengineer 3 days ago | parent | prev | next [-]

Is there a Browser extension that farbles all these APIs on purpose instead of blocking them?

By farbling I mean making the data look like it's the most common Windows configuration, for example.

dns_snek 2 days ago | parent | next [-]

I think that's impossible to do with an extension, there are far too many holes to plug and it's a moving target, it has to be done in the browser. I believe GrapheneOS is trying to do that with Vanadium (security and privacy hardened fork of Chromium for Android).

tapete2 3 days ago | parent | prev | next [-]

AdNauseam does something like this.

landgenoot 3 days ago | parent | prev [-]

I don't think that will work, because that will also provide false information to the logic.

You will have messed up layouts and unneeded quirks. Moreover, banks are using fingerprinting to detect fraud so you will have a hard time on those websites as well.

And more importantly.

https://xkcd.com/1105/

cookiengineer 3 days ago | parent [-]

By this logic you cannot use anything, because there's likely at least one website that uses its featureset.

Of course I wouldn't farble on my bank's website, that would be pretty stupid.

But by default I would want trackers to get the farbled data, and only allowlist the websites I trust. Same trust concept as with uBlock Origin, NoScript and others.

brirec 3 days ago | parent | prev [-]

What the fuck up does this do?

scotty79 3 days ago | parent [-]

Shadows bunch of builtin browser JS functions so they do nothing.