|
|
@ -42,10 +42,8 @@ if (!PDFJS.workerSrc && typeof document !== 'undefined') { |
|
|
|
// workerSrc is not set -- using last script url to define default location
|
|
|
|
// workerSrc is not set -- using last script url to define default location
|
|
|
|
PDFJS.workerSrc = (function () { |
|
|
|
PDFJS.workerSrc = (function () { |
|
|
|
'use strict'; |
|
|
|
'use strict'; |
|
|
|
var scriptTagContainer = document.body || |
|
|
|
var pdfJsSrc = document.currentScript.src; |
|
|
|
document.getElementsByTagName('head')[0]; |
|
|
|
return pdfJsSrc && pdfJsSrc.replace(/\.js$/i, '.worker.js'); |
|
|
|
var pdfjsSrc = scriptTagContainer.lastChild.src; |
|
|
|
|
|
|
|
return pdfjsSrc && pdfjsSrc.replace(/\.js$/i, '.worker.js'); |
|
|
|
|
|
|
|
})(); |
|
|
|
})(); |
|
|
|
} |
|
|
|
} |
|
|
|
//#endif
|
|
|
|
//#endif
|
|
|
|