Replies: 2 comments 1 reply
-
Most likely, yes. This extension needs to do "a lot" of prep work to get all the files and code ready. It's in the However, you could "easily" block external
This extension can also create dynamic content blockers by using the declarativeNetRequest API. A "DNR" userscript looks like this: // ==UserScript==
// @name Reddit Redirect
// @description Redirects all Reddit requests to the old version of the website
// @run-at request
// ==/UserScript==
{
"id": 6,
"priority": 1,
"action": {
"type": "redirect",
"redirect": {
"transform": { "scheme": "https", "host": "old.reddit.com" }
}
},
"condition": { "urlFilter": "||www.reddit.com", "resourceTypes": ["main_frame"] }
} You'd have to read through the documentation to figure out how to block all/some |
Beta Was this translation helpful? Give feedback.
-
I don't know how that works, but some inline scripts are hard to block. For example: <script>window.location="https://example.net"</script> This API cannot be overridden. Even if you can do something before the document loads. Also, in this extension we have to use a lot of asynchronous functions to handle some processes, so we can't inject the script early enough, which has always been an issue we want to solve. |
Beta Was this translation helpful? Give feedback.
-
I'm looking for a way to emulate the StopTheScript extension using quoid/userscripts.
In that article, Jeff mentions that in order for StopTheScript to work, the extension must run at
document_start
and according to the manifest here, Userscripts does run during that event.However, he says:
So, I'm not sure that this is possible via quoid/userscripts because I'm not sure how I can write a script that runs before the document has even been loaded.
It's probably impossible, right?
Beta Was this translation helpful? Give feedback.
All reactions