Moved websearch and speedtest into site
This commit is contained in:
parent
1da582aa81
commit
b3916c66e8
|
@ -20,7 +20,7 @@
|
|||
<header>
|
||||
<div id="topbar">
|
||||
<aside>
|
||||
<a href="https://speedtest.slvit.us/">Speedtest</a> | <a href="https://searx.slvit.us/">Web search</a>
|
||||
<a href="/speedtest/">Speedtest</a> | <a href="/websearch/">Web search</a>
|
||||
</aside>
|
||||
<aside id="rh-aside">
|
||||
<a href="/login">Login</a>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: layouts/base.njk
|
||||
title: Speedtest
|
||||
---
|
||||
|
||||
<iframe id="speedtest-frame" src="https://speedtest.slvit.us/" style="border:none;width:100%;min-height:700px;height:calc(70vh + 10vw)"></iframe>
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
layout: layouts/base.njk
|
||||
title: Web search
|
||||
---
|
||||
|
||||
<h1>{{title}}</h1>
|
||||
|
||||
<p>Use this page to anonymously search the web.</p>
|
||||
|
||||
<div class="flex">
|
||||
<input id="search-box" type="text" placeholder="Enter your query here" style="width:80%">
|
||||
<button id="search-btn" onClick="search()">Search</button>
|
||||
</div>
|
||||
<script>
|
||||
const SEARX_URL = 'https://searx.slvit.us'
|
||||
const searchBox = document.getElementById('search-box')
|
||||
function search(){
|
||||
window.location.href = `${SEARX_URL}/?q=${encodeURIComponent(searchBox.value)}`
|
||||
}
|
||||
function checkLength() {
|
||||
document.getElementById('search-btn').disabled = (searchBox.value.length===0)
|
||||
}
|
||||
searchBox.addEventListener('keyup', (e) => {
|
||||
if (!e) var e = window.event
|
||||
if (e.keyCode === 13) search()
|
||||
else checkLength()
|
||||
}, false)
|
||||
</script>
|
Loading…
Reference in New Issue