by dheera · 1y ago · 0 comments
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); const iframe = document.createElement("iframe");
document.body.append(iframe);
iframe.contentWindow... 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
});
})();By farbling I mean making the data look like it's the most common Windows configuration, for example.
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.
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.