openwrt_helloworld/luci-app-passwall/luasrc/view/passwall/auto_switch/footer.htm
nftbty 36c6425b3f luci: unified code style (#2395)
* luci: unified code style
- checked newline at end of file
- unified indent
- removed whitespaces at end of line

* luci: change the indentation of lua files to tabs
2023-03-27 20:25:52 +08:00

24 lines
954 B
HTML

<%
local api = require "luci.passwall.api"
-%>
<script type="text/javascript">
//<![CDATA[
function add_node_by_key() {
var key = prompt("<%:Please enter the node keyword, pay attention to distinguish between spaces, uppercase and lowercase.%>", "");
if (key) {
window.location.href = '<%=api.url("autoswitch_add_node")%>' + "?key=" + key;
}
}
function remove_node_by_key() {
var key = prompt("<%:Please enter the node keyword, pay attention to distinguish between spaces, uppercase and lowercase.%>", "");
if (key) {
window.location.href = '<%=api.url("autoswitch_remove_node")%>' + "?key=" + key;
}
}
//]]>
</script>
<input class="btn cbi-button cbi-button-add" type="button" onclick="add_node_by_key()" value="<%:Add nodes to the standby node list by keywords%>" />
<input class="btn cbi-button cbi-button-remove" type="button" onclick="remove_node_by_key()" value="<%:Delete nodes in the standby node list by keywords%>" />