From 29e06e01f9b2bf9f74b3b006edde6e969e56b052 Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Mon, 27 Feb 2023 19:37:09 +0800 Subject: [PATCH] c --- searx/webapp.py | 11 ++++++++--- searx/webapp1.py | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 04ebf251f..14cf5d049 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1505,11 +1505,16 @@ function proxify() { try{ for(let i=prompt.url_proxy.length;i>=0;--i) + { if(document.querySelector("#fnref\\:"+String(i))) - delete document.querySelector("#fnref\\:"+String(i)).href - document.querySelector("#fnref\\:"+String(i)).addEventListener('click', function () { + link_tmp = document.querySelector("#fnref\\:"+String(i)) + link_tmp.removeAttribute('href') + link_tmp.removeAttribute('id') + link_tmp.addEventListener('click', function () { modal.style.display = 'block'; modal_open(prompt.url_proxy[i]) - }) + }); + } + }catch(e){} } diff --git a/searx/webapp1.py b/searx/webapp1.py index 04ebf251f..14cf5d049 100644 --- a/searx/webapp1.py +++ b/searx/webapp1.py @@ -1505,11 +1505,16 @@ function proxify() { try{ for(let i=prompt.url_proxy.length;i>=0;--i) + { if(document.querySelector("#fnref\\:"+String(i))) - delete document.querySelector("#fnref\\:"+String(i)).href - document.querySelector("#fnref\\:"+String(i)).addEventListener('click', function () { + link_tmp = document.querySelector("#fnref\\:"+String(i)) + link_tmp.removeAttribute('href') + link_tmp.removeAttribute('id') + link_tmp.addEventListener('click', function () { modal.style.display = 'block'; modal_open(prompt.url_proxy[i]) - }) + }); + } + }catch(e){} }