mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-04 20:23:56 +08:00
update 2026-07-16 04:54:23
This commit is contained in:
1 parent
6bc60cfbf2
commit
151daa8c75
42 files changed
+645
-689
No files matched your search
@@ -52,5 +52,29 @@ local api = self.api
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function fetchCertSha256(el) {
|
||||
if (el.getAttribute("data-loading") === "1") return;
|
||||
el.setAttribute("data-loading", "1");
|
||||
el.style.pointerEvents = "none";
|
||||
el.style.color = "red";
|
||||
XHR.get('<%=api.url("fetch_certsha256")%>', { id: node_id }, function(x, res) {
|
||||
el.setAttribute("data-loading", "0");
|
||||
el.style.pointerEvents = "";
|
||||
el.style.color = "";
|
||||
if (!x || x.status !== 200) {
|
||||
alert("<%:Error%>");
|
||||
return;
|
||||
}
|
||||
if (!res || res.code !== 1 || !res.data) {
|
||||
alert(res && res.msg ? res.msg : "<%:Fetch Failed%> !");
|
||||
return;
|
||||
}
|
||||
const inputs = document.querySelectorAll('input[id$=".xray_tls_pinSHA256"]');
|
||||
inputs.forEach(function(input) {
|
||||
input.value = res.data;
|
||||
});
|
||||
});
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
Reference in new issue
Block a user