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 iframe = document.querySelector("#iframe-wrapper > iframe");
|
||||
iframe.src = url;
|
||||
if (iframe.attachEvent) {
|
||||
iframe.attachEvent("pagesloaded", function() {
|
||||
if (iframe.attachEvent&&num!='pdf') {
|
||||
iframe.attachEvent("onload", function() {
|
||||
resolve("success");
|
||||
});
|
||||
} 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");
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue