ansero_example.html

This commit is contained in:
Dan Hollinger 2020-12-09 01:33:08 +01:00
parent ed9a79145e
commit f3403507f9
1 changed files with 12 additions and 7 deletions

View File

@ -24,14 +24,14 @@ a[onclick] {
<script>
// read API document
let apiurl = 'https://api.nnpaefp7pkadbxxkhz2agtbv2a4g5sgo2fbmv3i7czaua354334uqqad.onion/_/ansero.php';
let favurl = 'https://api.nnpaefp7pkadbxxkhz2agtbv2a4g5sgo2fbmv3i7czaua354334uqqad.onion/_/favicon.php?f=';
let mylang = 'en-US';
let hide_domain = []; // e.g. 'google.com'
let hide_fqdn = []; // e.g. 'en.wikipedia.org'
let apiurl = 'https://(API)/_/ansero.php';
let favurl = 'https://(API)/_/favicon.php?f=';
let mylang = 'en-US'; // e.g. 'fr'
let hide_domain = []; // e.g. ['google.com', 'google.fr']
let hide_fqdn = []; // e.g. ['en.wikipedia.org']
let removeMITMsites = false;
function searchfor(key) {
function searchFor(key) {
document.getElementById('what').value = key;
search();
}
@ -59,10 +59,15 @@ function search() {
if (r.sgst.length > 0) {
answer += '<span class="srch_sect">Search other: <br>';
r.sgst.forEach(x => {
answer += '[<a class="srch_link" onclick="searchfor(\'' + x + '\');return false;">' + x + '</a>]<br>';
answer += '[<a class="srch_link" onclick="searchFor(\'' + x + '\');return false;">' + x + '</a>]<br>';
});
answer += '</span><br><br>';
}
if (r.crct.length > 0) {
answer += '<span class="srch_sect">Maybe: ';
answer += '[<a class="srch_link" onclick="searchFor(\'' + r.crct[0] + '\');return false;">' + r.crct[0] + '</a>]<br>';
answer += '</span><br><br>';
}
r.res.forEach(x => {
if (!hide_fqdn.includes(x.fqdn) && !hide_domain.includes(x.dom)) {
answer += '<span class="srch_sect">';