var ERRORS = 0, WARNINGS = 1, TODOS = 5;
var verbosity = WARNINGS;
-var useWorker = true;
+var useWorker = false;
// The global PDFJS object exposes the API
// In production, it will be declared outside a global wrapper
'use strict';
-this.onmessage = function(evt) {
+function onMessageLoader(evt) {
// Reset the `onmessage` function as it was only set to call
// this function the first time a message is passed to the worker
// but shouldn't get called anytime afterwards.
for (var i = 0; i < files.length; i++) {
importScripts(dir + files[i]);
}
-}.bind(this);
+}
+
+this.onmessage = onMessageLoader.bind(this);