2 Copyright
2017-
2018 Dirk Brenken (dev@brenken.org)
3 This is free software, licensed under the Apache License, Version
2.0
8 <script type=
"text/javascript">
10 var stxhr = new XHR();
12 function update_status(data)
14 var domain = data.value || data.placeholder;
15 var input = document.getElementById('query_input');
16 var output = document.getElementById('query_output');
21 '
<img src=
"<%=resource%>/icons/loading.gif" alt=
"<%:Loading%>" style=
"vertical-align:middle" /> ' +
22 '<%:Waiting for command to complete...%
>'
24 input.parentNode.style.display = 'block';
25 input.style.display = 'inline';
26 stxhr.post('<%=luci.dispatcher.build_url('admin/services/adblock/advanced/result/')%
>' + domain, { token: '<%=token%
>' },
31 input.style.display = 'none';
32 output.innerHTML = String.format('
<pre>%h
</pre>', x.responseText);
36 input.style.display = 'none';
37 output.innerHTML = '
<span class=
"error"><%:Blocklist not found!%
></span>';
46 <form method=
"post" action=
"<%=REQUEST_URI%>" onsubmit=
"update_status(this.input); return false;">
48 <div class=
"cbi-section">
49 <div class=
"cbi-section-descr"><%:This form allows you to query active block lists for certain domains, e.g. for whitelisting.%
></div>
50 <div style=
"width:33%; float:left;">
51 <input type=
"text" placeholder=
"google.com" name=
"input" />
52 <input type=
"button" value=
"<%:Query%>" class=
"cbi-button cbi-button-apply" onclick=
"update_status(this.form.input)" />
54 <br style=
"clear:both" />
58 <div class=
"cbi-section" style=
"display:none">
59 <h3 id=
"query_input"><%:Collecting data...%
></h3>
60 <span id=
"query_output"></span>