Created
December 3, 2011 16:33
-
-
Save notmasteryet/1427516 to your computer and use it in GitHub Desktop.
attempt to fix pdf.js for webOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core.js b/src/core.js | |
index 284b3cb..b8d5c98 100644 | |
--- a/src/core.js | |
+++ b/src/core.js | |
@@ -316,7 +316,7 @@ var Page = (function pagePage() { | |
startRendering: function pageStartRendering(ctx, callback, textLayer) { | |
this.ctx = ctx; | |
this.callback = callback; | |
- this.textLayer = textLayer; | |
+ this.textLayer = false && textLayer; | |
this.startRenderingTime = Date.now(); | |
this.pdf.startRendering(this); | |
@@ -486,7 +486,7 @@ var PDFDoc = (function pdfDoc() { | |
// all requirements to run parts of pdf.js in a web worker. | |
// Right now, the requirement is, that an Uint8Array is still an Uint8Array | |
// as it arrives on the worker. Chrome added this with version 15. | |
- if (!globalScope.PDFJS.disableWorker && typeof Worker !== 'undefined') { | |
+ if (false && !globalScope.PDFJS.disableWorker && typeof Worker !== 'undefined') { | |
var workerSrc = PDFJS.workerSrc; | |
if (typeof workerSrc === 'undefined') { | |
throw 'No PDFJS.workerSrc specified'; | |
diff --git a/web/compatibility.js b/web/compatibility.js | |
index 7d1d725..5ec2609 100644 | |
--- a/web/compatibility.js | |
+++ b/web/compatibility.js | |
@@ -62,9 +62,8 @@ | |
// Object.defineProperty() ? | |
(function checkObjectDefinePropertyCompatibility() { | |
- if (typeof Object.defineProperty !== 'undefined') | |
- return; | |
- | |
+ //if (typeof Object.defineProperty !== 'undefined') | |
+ // return; | |
Object.defineProperty = function objectDefineProperty(obj, name, def) { | |
delete obj[name]; | |
if ('get' in def) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment