16

Is there any way to make chrome or any other browser run a snippet right after a page reloads? Thanks!

Vladimir Mironov
  • 655
  • 1
  • 7
  • 23
  • Bookmarklets(Javascript bookmarks) are an easier/faster way to run scripts on sites. But still, they have to be run manually. – Sarath S Menon Jun 19 '21 at 10:38

1 Answers1

17

Since Snippets at the moment cannot be referenced (and started) from your code, you are not able to simply run them, you have to select and run it via the DevTools interface.

But you can automatically run your own code with other browser extensions, eg. Tampermonkey/Greasemonkey. In this case the logic that is implemented in the required snippet should be put into a Tampermonkey script.

Community
  • 1
  • 1
Attila Kevei
  • 186
  • 1
  • 4