Skip to content

Commit 6410366

Browse files
committed
try auto img reload
1 parent 961e1f3 commit 6410366

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pdf2htmlEX/share/pdf2htmlEX.js.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,19 @@ Viewer.prototype = {
335335

336336
this.initialize_radio_button();
337337
this.render();
338+
339+
{
340+
// deal with image reloading
341+
var images = document.getElementsByTagName('img');
342+
for (var i = 0; i < images.length; i++) {
343+
images[i].addEventListener('error', function() {
344+
setTimeout(function() {
345+
images[i].src = images[i].src;
346+
}, 1000);
347+
});
348+
images[i].src = images[i].src;
349+
}
350+
}
338351
},
339352

340353
/*

0 commit comments

Comments
 (0)