Search code examples
javascriptpuppeteeruserscripts

Run a tampermonkey user script with Puppeteer


Is it possible to run a Tampermokey script in headless chromium with Puppeteer?

If so, how do you do it?


Solution

  • While this doesn't answer my question directly, the solution that ended up working for me was to write a custom chrome extension using the user script that I wanted to use. I then loaded the extension in headless: "new" using this method:

    https://pptr.dev/guides/chrome-extensions