7 ms·
setTimeout(() => { // fuck up all future javascripts setTimeout = setInterval = requestAnimationFrame = () => {}; Element.prototype.ap
by dheera 1y 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);
- brirec 1y agoWhat the fuck up does this do?
- scotty79 1y agoShadows bunch of builtin browser JS functions so they do nothing.
- vhcr 1y agoconst iframe = document.createElement("iframe"); document.body.append(iframe); iframe.contentWindow...
- joquarky 1y agojavascript:(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 1y agoIs 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.
- landgenoot 1y agoI 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/ https://xkcd.com/1105/
- cookiengineer 1y agoBy 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.
- tapete2 1y agoAdNauseam does something like this.
- dns_snek 1y agoI 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).