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( () => {