From 07a7f9fac659b8ba94bac2fea685431f828b3ace Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Mon, 6 Mar 2023 10:02:50 +0800 Subject: [PATCH] f --- searx/webapp.py | 1244 +++++++++++++++++++++++++++++++++++++++++++++- searx/webapp1.py | 16 +- 2 files changed, 1251 insertions(+), 9 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 461c3b671..68e95fafd 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1213,7 +1213,1249 @@ const net_search = ''' + net_search_str + r''' const add_system = ''' + add_system +r''' ''' # for i in range(1,16): diff --git a/searx/webapp1.py b/searx/webapp1.py index 4dbbf7a1f..68e95fafd 100644 --- a/searx/webapp1.py +++ b/searx/webapp1.py @@ -1303,20 +1303,20 @@ function modal_open(url, num) iframe.attachEvent("onload", function() { resolve("success"); }); - } else if (iframe.attachEvent&&num=='pdf') { - iframe.attachEvent("textlayerrendered", function() { - resolve("success"); - }); - } else if (num=='pdf'){ - iframe.textlayerrendered = function() { - resolve("success"); - }; + } else if (num=='pdf') { + iframe.contentDocument.addEventListener('pagesloaded', function (e) { + resolve("success"); + }, true); }else{ iframe.onload = function() { resolve("success"); }; } }); + + + + keytextres = [] iframePromise.then( () => {