luci-app-passwall: sync upstream

last commit: 0317b878d8
This commit is contained in:
gitea-action 2025-05-01 13:00:24 +08:00
parent 70837874cf
commit 9845fcb311
3 changed files with 14 additions and 3 deletions

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall PKG_NAME:=luci-app-passwall
PKG_VERSION:=25.5.1 PKG_VERSION:=25.5.1
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_CONFIG_DEPENDS:= \ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \ CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \

View File

@ -4,9 +4,20 @@ local api = require "luci.passwall.api"
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
function getXHR() {
if (typeof XHR === 'object' && typeof XHR.create === 'function') {
return XHR.create();
} else if (typeof XHR === 'function') {
return new XHR();
} else {
throw new Error("XHR is not supported in this environment.");
}
}
function ajax_add_node(link) { function ajax_add_node(link) {
var xhr = getXHR();
if (link) { if (link) {
XHR.post('<%=api.url("link_add_node")%>', { xhr.post('<%=api.url("link_add_node")%>', {
'link': link 'link': link
}, },
function(x, data) { function(x, data) {

View File

@ -1,5 +1,5 @@
diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile
index fcd7602..6bd9e31 100644 index 7614bc2..364bb64 100644
--- a/luci-app-passwall/Makefile --- a/luci-app-passwall/Makefile
+++ b/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile
@@ -67,7 +67,7 @@ config PACKAGE_$(PKG_NAME)_Nftables_Transparent_Proxy @@ -67,7 +67,7 @@ config PACKAGE_$(PKG_NAME)_Nftables_Transparent_Proxy