Skip to content

Commit

Permalink
version 0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Emano-Waldeck committed Feb 10, 2020
1 parent 5d4151e commit 9983f99
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions data/viewer/overwrite.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global PDFViewerApplication */
'use strict';

// prevent CROS error
Expand All @@ -19,3 +20,14 @@ try {
fetch(favicon).then(r => set(r.ok ? favicon : undefined), set());
}
catch (e) {}

// worker requests
navigator.serviceWorker.addEventListener('message', e => {
if (e.data.method === 'open-file') {
const reader = new FileReader();
reader.onload = () => {
PDFViewerApplication.open(new Uint8Array(reader.result));
};
reader.readAsArrayBuffer(e.data.file);
}
});
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manifest_version": 2,
"version": "0.1.4",
"version": "0.1.5",
"name": "PDF Reader",
"description": "A Portable Document Format (PDF) viewer based on Mozilla's PDF.js library",
"icons": {
Expand Down

0 comments on commit 9983f99

Please sign in to comment.