louisabraham / docsend-dl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docsend-dl

This add-on adds a download button on Docsend documents.

Get this extension on Firefox.

banner

How it works

  1. A "Download" button is injected on the page.
  2. The page is reloaded to reload all images and avoid token expiration. The URL has a #download hash to know the button was pressed.
  3. The navigation buttons are triggered to go through the whole presentation to load all the slides.
  4. The image urls are retrieved from the DOM.
  5. The images are loaded from the content script (to use cache) and assembled using jsPDF.
  6. The assembled PDF is converted to a Data URI and sent to the background script.
  7. The background script triggers the download. Those last two steps are necessary because of content script limitations.
  8. The user is redirected to the normal URL without hash.

About

License:MIT License


Languages

Language:JavaScript 100.0%