From 2015f199bdf03a3aa23fc838d8217f2d4e06a10a Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Thu, 2 Mar 2023 22:11:34 +0800 Subject: [PATCH] c --- searx/webapp.py | 3 ++- searx/webapp1.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index c9e6f642e..7737a676e 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1202,7 +1202,8 @@ function proxify() { let tmp_url = document.querySelector("#fnref\\:"+String(i+1)).href if(!tmp_url||!prompt.url_proxy[tmp_url]) continue; - document.querySelector("#fnref\\:"+String(i+1)).onclick = function() { modal_open(prompt.url_proxy[tmp_url],i+1) }; + const nowurl = modal_open(prompt.url_proxy[tmp_url] + document.querySelector("#fnref\\:"+String(i+1)).onclick = function() { modal_open(nowurl,i+1) }; document.querySelector("#fnref\\:"+String(i+1)).removeAttribute('href') document.querySelector("#fnref\\:"+String(i+1)).removeAttribute('id') } diff --git a/searx/webapp1.py b/searx/webapp1.py index c9e6f642e..7737a676e 100644 --- a/searx/webapp1.py +++ b/searx/webapp1.py @@ -1202,7 +1202,8 @@ function proxify() { let tmp_url = document.querySelector("#fnref\\:"+String(i+1)).href if(!tmp_url||!prompt.url_proxy[tmp_url]) continue; - document.querySelector("#fnref\\:"+String(i+1)).onclick = function() { modal_open(prompt.url_proxy[tmp_url],i+1) }; + const nowurl = modal_open(prompt.url_proxy[tmp_url] + document.querySelector("#fnref\\:"+String(i+1)).onclick = function() { modal_open(nowurl,i+1) }; document.querySelector("#fnref\\:"+String(i+1)).removeAttribute('href') document.querySelector("#fnref\\:"+String(i+1)).removeAttribute('id') }