Ask the TM's developer on their forum or github repo. If done properly, a sandboxed userscript (the one that doesn't have @grant none
) should use DOM classes, methods, standard JS functions from the extension's content script context, which is executed by the browser in an isolated world, meaning the page can't overwrite any of its methods.
P.S. we can try summonning @derjanb here though. P.P.S. see also https://github.com/Tampermonkey/tampermonkey/issues/211
Tampermonkey run-at document-start is too slow.
Long story short, in Tampermonkey if you set the run-at metadata key to document-start the userscript will begin execution after the entire HTML <head> element has loaded. The problem is that the page I have the userscript running on has a script element in the head that changes global functions like console.log, console.error, etc, that the wrapper in Tampermonkey itself uses. (Userscripts in Tampermonkey are 'wrapped' in code that looks like:)
As you can see, this wrapper makes use of global functions, but after they're already changed by the page. If the page wanted to, they could break ALL Tampermonkey userscripts outright.
Solutions? Does Greasemonkey for Firefox do this?