Mettre à jour PDF.js
Pour mettre à jour PDF.js:
Aller à https://github.com/mozilla/pdf.js/releases/latest et télécharger le fichier
pdfjs-<VERSION>-dist.zip.Supprimer les anciens fichiers:
git rm -r asset/vendor/pdf.js
Extraire le contenu du fichier .zip à l’intérieur de
asset/vendor/pdf.js:unzip pdfjs-<VERSION>-dist.zip -d asset/vendor/pdf.js
Edit
asset/vendor/pdf.js/web/viewer.jsand addwindow.location.origintoHOSTED_VIEWER_ORIGINS. It should look like this:const HOSTED_VIEWER_ORIGINS = ["null", "http://mozilla.github.io", "https://mozilla.github.io", window.location.origin];
Commit!
git add asset/vendor/pdf.js && git commit -m 'Update PDF.js to <VERSION>'