1
0
Fork 0
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:
Brendan Dahl 2012-10-29 12:44:18 -07:00
parent 3c5a9ba64b
commit babd8df176
5 changed files with 25 additions and 68 deletions

View file

@ -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;