mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-21 12:40:08 +00:00
Merge pull request #357 from duanyao/master
Fix XHR failure for file: protocol.
This commit is contained in:
commit
ffbb32ab8a
1
AUTHORS
1
AUTHORS
@ -6,6 +6,7 @@ Chris Cinelli <chris@allestelle.com>
|
|||||||
Daniel Bonniot de Ruisselet <dbonniot@chemaxon.com>
|
Daniel Bonniot de Ruisselet <dbonniot@chemaxon.com>
|
||||||
Deepak <iapain@gmail.com>
|
Deepak <iapain@gmail.com>
|
||||||
Denis Sablic <denis.sablic@gmail.com>
|
Denis Sablic <denis.sablic@gmail.com>
|
||||||
|
Duan Yao <duanyao@ustc.edu>
|
||||||
filodej <philode@gmail.com>
|
filodej <philode@gmail.com>
|
||||||
hasufell <julian.ospald@googlemail.com>
|
hasufell <julian.ospald@googlemail.com>
|
||||||
Herbert Jones <herbert@mediafire.com>
|
Herbert Jones <herbert@mediafire.com>
|
||||||
|
@ -372,9 +372,8 @@ Viewer.prototype = {
|
|||||||
var _idx = idx;
|
var _idx = idx;
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', url, true);
|
xhr.open('GET', url, true);
|
||||||
xhr.onreadystatechange = function(){
|
xhr.onload = function(){
|
||||||
if (xhr.readyState != 4) return;
|
if (xhr.status === 200 || xhr.status === 0) {
|
||||||
if (xhr.status === 200) {
|
|
||||||
// find the page element in the data
|
// find the page element in the data
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.innerHTML = xhr.responseText;
|
div.innerHTML = xhr.responseText;
|
||||||
|
Loading…
Reference in New Issue
Block a user