From 73f01522eda3d61baed6f39a71bcfa763d5d4017 Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 16 May 2025 19:06:48 +0800 Subject: [PATCH] Update public.js --- web/static/app/public.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/web/static/app/public.js b/web/static/app/public.js index e8fbd9466..c1d22ff71 100755 --- a/web/static/app/public.js +++ b/web/static/app/public.js @@ -1227,12 +1227,22 @@ function bindPanel(a,type,ip,btid,url,user,pw){ var str =$(this).val(); var isip = /([\w-]+\.){2,6}\w+/; var iptext = str.match(isip); - if(iptext) $("#bttitle").val(iptext[0]); + if(iptext) { + var bttitle_val = $("#bttitle").val(); + if (bttitle_val == '') { + $("#bttitle").val(iptext[0]); + } + } }).blur(function(){ var str =$(this).val(); var isip = /([\w-]+\.){2,6}\w+/; var iptext = str.match(isip); - if(iptext) $("#bttitle").val(iptext[0]); + if(iptext) { + var bttitle_val = $("#bttitle").val(); + if (bttitle_val == '') { + $("#bttitle").val(iptext[0]); + } + } }); } });