Created
August 4, 2024 23:46
-
-
Save velzie/27495dd1ee23cedd76e56bfaf8722c59 to your computer and use it in GitHub Desktop.
fix youtube errors on non google chrome browsers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name fix google breaking youtube on certain browsers | |
// @run-at document-start | |
// @version 2024-08-04 | |
// @description fuck google | |
// @author velzie | |
// @match https://www.youtube.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// @grant none | |
// ==/UserScript== | |
// service worker is rigged to crash navigation after a while, haven't debugged this any further | |
navigator.__defineGetter__("serviceWorker",()=>{}); | |
// if adblocker is detected google tries to spam requests to lag out ublock | |
navigator.sendBeacon = ()=>true; | |
XMLHttpRequest.prototype.open = new Proxy(XMLHttpRequest.prototype.open, { | |
apply(fn, that, args) { | |
if (args[1].includes("log_event") || args[1].includes("hasfast")) return; | |
return Reflect.apply(fn, that, args); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment