From eb886782717a4015c3a02fdc66027968bf12cfb6 Mon Sep 17 00:00:00 2001 From: frainzy1477 Date: Wed, 1 Jul 2020 01:55:41 +0800 Subject: [PATCH] 1.7.5.2 --- luasrc/view/clash/status.htm | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/luasrc/view/clash/status.htm b/luasrc/view/clash/status.htm index c3c2bcbf..f00f44d2 100644 --- a/luasrc/view/clash/status.htm +++ b/luasrc/view/clash/status.htm @@ -240,30 +240,22 @@ if ( x && x.status == 200 ) { if(status.new_version > status.current_version) { - dnew.innerHTML ='
'; + dnew.innerHTML ='

<%:Download Update%>
'; + } } }); - XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "clash", "check_status")%>', null, function(x, status) { + XHR.poll(3, '<%=luci.dispatcher.build_url("admin", "services", "clash", "check_status")%>', null, function(x, status) { if ( x && x.status == 200 ) { if(status.new_version > status.current_version) { - dnew.innerHTML ='
'; + dnew.innerHTML ='

<%:Download Update%>
'; } } }); -function download_update(btn) -{ -XHR.get('<%=luci.dispatcher.build_url("admin", "services", "clash", "check_status")%>', null, function(x, status) { - - btn.value = '<%:Download Update%>'; - url='https://github.com/frainzy1477/luci-app-clash/releases/download/'+status.new_version+'/luci-app-clash_'+status.new_version+'_all.ipk'; - window.open(url); -}); -} //]]>