Any site that has a half decent Content Security Policy would prevent this. (You can try on HN, GitHub, etc and it fails)
However it may work as a UserScript depending on the UserScript engine.
However it may work as a UserScript depending on the UserScript engine.