throbber added
This commit is contained in:
parent
251ae48159
commit
c8753d1ad9
|
@ -1,3 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Tildeverse Gemini Proxy (Powered by Wobbly)</title>
|
||||
|
|
18
main.js
18
main.js
|
@ -7,6 +7,7 @@ var wobblyAddressBar
|
|||
var wobblyGo
|
||||
var wobblySpinner
|
||||
var startpage = 'gemini://tildeverse.org/'
|
||||
var xhr
|
||||
|
||||
function geminiInit() {
|
||||
// Store references to all our DOM elements
|
||||
|
@ -82,15 +83,22 @@ function geminiGo(fromURL) {
|
|||
|
||||
wobblySpinner.classList.add('active')
|
||||
|
||||
if (xhr) {
|
||||
xhr.abort()
|
||||
}
|
||||
|
||||
// Send gemini request to cgi and populate result into wobbly window
|
||||
const xmlHttp = new XMLHttpRequest()
|
||||
xmlHttp.open( "GET", "browser.cgi?" + url )
|
||||
xmlHttp.onload = function () {
|
||||
const body = xmlHttp.responseText
|
||||
xhr = new XMLHttpRequest()
|
||||
xhr.open( "GET", "browser.cgi?" + url )
|
||||
xhr.onload = function () {
|
||||
const body = xhr.responseText
|
||||
wobblyWindow.innerHTML = body
|
||||
wobblySpinner.classList.remove('active')
|
||||
}
|
||||
xmlHttp.send(null)
|
||||
xhr.onerror = function () {
|
||||
console.error(xhr.statusText)
|
||||
}
|
||||
xhr.send(null)
|
||||
}
|
||||
|
||||
// Simple show/hide of help block
|
||||
|
|
|
@ -137,18 +137,19 @@ h1, h2, h3, h4, h5 {
|
|||
position: fixed;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
top: 32px;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
height: calc(100vh - 32px);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
z-index: 5;
|
||||
background: rgba(0,0,0,0.3);
|
||||
backdrop-filter: blur(2px);
|
||||
backdrop-filter: blur(1px);
|
||||
}
|
||||
#wobbly-spinner.active {
|
||||
display: block;
|
||||
display: flex;
|
||||
}
|
||||
.lds-spinner {
|
||||
color: official;
|
||||
|
|
Loading…
Reference in New Issue