mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Update webapp1.py
This commit is contained in:
parent
17d112d98f
commit
a07b3aa0e7
1 changed files with 12 additions and 3 deletions
|
@ -1299,12 +1299,21 @@ function modal_open(url, num)
|
||||||
var iframePromise = new Promise((resolve, reject) => {
|
var iframePromise = new Promise((resolve, reject) => {
|
||||||
var iframe = document.querySelector("#iframe-wrapper > iframe");
|
var iframe = document.querySelector("#iframe-wrapper > iframe");
|
||||||
iframe.src = url;
|
iframe.src = url;
|
||||||
if (iframe.attachEvent) {
|
if (iframe.attachEvent&&num!='pdf') {
|
||||||
iframe.attachEvent("pagesloaded", function() {
|
iframe.attachEvent("onload", function() {
|
||||||
resolve("success");
|
resolve("success");
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
iframe.pagesloaded = function() {
|
iframe.onload = function() {
|
||||||
|
resolve("success");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (iframe.attachEvent&&num=='pdf') {
|
||||||
|
iframe.attachEvent("textlayerrendered", function() {
|
||||||
|
resolve("success");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
iframe.textlayerrendered = function() {
|
||||||
resolve("success");
|
resolve("success");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue