Update PDF.js in PDF reader
This commit is contained in:
parent
5880d62000
commit
e6e424836d
3 changed files with 4 additions and 5 deletions
|
@ -24,8 +24,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const WORKER_URL = 'chrome://zotero/content/xpcom/pdfWorker/worker.js';
|
const WORKER_URL = 'chrome://zotero/content/xpcom/pdfWorker/worker.js';
|
||||||
const CMAPS_URL = 'chrome://zotero/content/xpcom/pdfWorker/cmaps/';
|
const CMAPS_URL = 'resource://zotero/pdf-reader/cmaps/';
|
||||||
const STANDARD_FONTS_URL = 'chrome://zotero/content/xpcom/pdfWorker/standard_fonts/';
|
const STANDARD_FONTS_URL = 'resource://zotero/pdf-reader/standard_fonts/';
|
||||||
const RENDERER_URL = 'resource://zotero/pdf-renderer/renderer.html';
|
const RENDERER_URL = 'resource://zotero/pdf-renderer/renderer.html';
|
||||||
|
|
||||||
class PDFWorker {
|
class PDFWorker {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 590af780053f198838c0f3b4afa3f197ef45453e
|
Subproject commit 40d044fc8aeb91d7855aa22b3025101e89c3a011
|
|
@ -35,8 +35,7 @@ async function getPDFWorker(signatures) {
|
||||||
catch (e) {
|
catch (e) {
|
||||||
await exec('npm ci', { cwd: modulePath });
|
await exec('npm ci', { cwd: modulePath });
|
||||||
await exec('npm run build', { cwd: modulePath });
|
await exec('npm run build', { cwd: modulePath });
|
||||||
// TODO: Don't copy 'cmaps' and 'standard_fonts' directories once pdf-reader is updated
|
await fs.copy(path.join(modulePath, 'build', 'worker.js'), path.join(targetDir, 'worker.js'));
|
||||||
await fs.copy(path.join(modulePath, 'build'), targetDir);
|
|
||||||
}
|
}
|
||||||
signatures['pdf-worker'] = { hash };
|
signatures['pdf-worker'] = { hash };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue