mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Un-inline pdf.js for the extension/mozcentral and remove fetch pdf by content code.
This commit is contained in:
parent
3c5a9ba64b
commit
babd8df176
5 changed files with 25 additions and 68 deletions
12
src/api.js
12
src/api.js
|
@ -456,19 +456,9 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||
}
|
||||
|
||||
try {
|
||||
var worker;
|
||||
//#if !(FIREFOX || MOZCENTRAL)
|
||||
// Some versions of FF can't create a worker on localhost, see:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=683280
|
||||
worker = new Worker(workerSrc);
|
||||
//#else
|
||||
// // The firefox extension can't load the worker from the resource://
|
||||
// // url so we have to inline the script and then use the blob loader.
|
||||
// var script = document.querySelector('#PDFJS_SCRIPT_TAG');
|
||||
// var blob = PDFJS.createBlob(script.textContent, script.type);
|
||||
// var blobUrl = window.URL.createObjectURL(blob);
|
||||
// worker = new Worker(blobUrl);
|
||||
//#endif
|
||||
var worker = new Worker(workerSrc);
|
||||
var messageHandler = new MessageHandler('main', worker);
|
||||
this.messageHandler = messageHandler;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue