javascriptgoogle-chrome-extensioncontent-scriptchrome-extension-manifest-v2

HTML button that uses Javascript to take whole webpage screenshot and saves it


I am new to chrome extensions and I am trying to build a google chrome extension that takes a screenshot and saves it on the PC. I've managed to create a HTML button in my popup page and link it to a content-script.js but I can't seem to get how to take a whole webpage screenshot and save it afterwards. If anyone has some experience with this please help :)


Solution

  • You can achieve it by using html2canvas.

    https://github.com/niklasvh/html2canvas