summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock/luasrc/view/adblock/query.htm
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2020-03-28 14:35:10 +0100
committerDirk Brenken <dev@brenken.org>2020-03-28 14:35:10 +0100
commit0f18b873d893a30564a2684e0dcc7f4fb68ed296 (patch)
treead80bf79f72e4a9935bcd74266afd4074d038ef9 /applications/luci-app-adblock/luasrc/view/adblock/query.htm
parent0adf93de3b78fae8a19843906852abad6c7855ae (diff)
luci-app-adblock: release 4.0.0
* complete rewrite, migrated to client side JS * tested with mainline 19.07 and current master * tested with latest Firefox & Chrome and all standard themes (not OpenWrt2020!) Pre-tested by many forum users, see here: https://forum.openwrt.org/t/adblock-4-pre-releases/57101 * sync translations Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-adblock/luasrc/view/adblock/query.htm')
-rw-r--r--applications/luci-app-adblock/luasrc/view/adblock/query.htm64
1 files changed, 0 insertions, 64 deletions
diff --git a/applications/luci-app-adblock/luasrc/view/adblock/query.htm b/applications/luci-app-adblock/luasrc/view/adblock/query.htm
deleted file mode 100644
index fb659958d..000000000
--- a/applications/luci-app-adblock/luasrc/view/adblock/query.htm
+++ /dev/null
@@ -1,64 +0,0 @@
-<%#
-Copyright 2017-2018 Dirk Brenken (dev@brenken.org)
-This is free software, licensed under the Apache License, Version 2.0
--%>
-
-<%+header%>
-
-<script type="text/javascript">
-//<![CDATA[
- var stxhr = new XHR();
-
- function update_status(data)
- {
- var domain = data.value || data.placeholder;
- var input = document.getElementById('query_input');
- var output = document.getElementById('query_output');
-
- if (input && output)
- {
- output.innerHTML =
- '<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /> ' +
- '<%:Waiting for command to complete...%>'
- ;
- input.parentNode.style.display = 'block';
- input.style.display = 'inline';
- stxhr.post('<%=luci.dispatcher.build_url('admin/services/adblock/advanced/result/')%>' + domain, { token: '<%=token%>' },
- function(x)
- {
- if (x.responseText)
- {
- input.style.display = 'none';
- output.innerHTML = String.format('<pre>%h</pre>', x.responseText);
- }
- else
- {
- input.style.display = 'none';
- output.innerHTML = '<span class="error"><%:Blocklist not found!%></span>';
- }
- }
- );
- }
- }
-//]]>
-</script>
-
-<form method="post" action="<%=REQUEST_URI%>" onsubmit="update_status(this.input); return false;">
- <div class="cbi-map">
- <div class="cbi-section">
- <div class="cbi-section-descr"><%:This form allows you to query active block lists for certain domains, e.g. for whitelisting.%></div>
- <div style="width:33%; float:left;">
- <input type="text" placeholder="google.com" name="input" />
- <input type="button" value="<%:Query%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.input)" />
- </div>
- <br style="clear:both" />
- <br />
- </div>
- </div>
- <div class="cbi-section" style="display:none">
- <h3 id="query_input"><%:Collecting data...%></h3>
- <span id="query_output"></span>
- </div>
-</form>
-
-<%+footer%>