google web, videos and news, various other fixes

This commit is contained in:
2023-11-27 01:01:56 -05:00
parent 9fd993b47b
commit 2519666e1c
22 changed files with 2913 additions and 1118 deletions

BIN
static/icon/call.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/icon/directions.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -160,6 +160,16 @@ function number_format(int){
return new Intl.NumberFormat().format(int);
}
window.fetch = (function(fetch) {
return function(fn, t){
const begin = Date.now();
return fetch.apply(this, arguments).then(function(response) {
response.ping = Date.now() - begin;
return response;
});
};
})(window.fetch);
// parse initial server list
fetch_server(window.location.origin);
@@ -187,25 +197,24 @@ async function fetch_server(server){
list.push(server);
var data = null;
var ping = new Date().getTime();
try{
data = await fetch(
var payload = await fetch(
server + "/ami4get"
);
if(data.status !== 200){
if(payload.status !== 200){
// endpoint is not available
errors++;
div_failedreqs.textContent = number_format(errors);
console.warn(server + ": Invalid HTTP code " + data.status);
console.warn(server + ": Invalid HTTP code " + payload.status);
return;
}
data = await data.json();
data.server.ping = new Date().getTime() - ping;
data = await payload.json();
data.server.ping = payload.ping;
}catch(error){

View File

@@ -499,6 +499,7 @@ h3,h4,h5,h6{
text-align:center;
display:block;
text-align:left;
white-space:nowrap;
}
.favicon-dropdown img{
@@ -1247,6 +1248,11 @@ table tr a:last-child{
padding-left:20px;
}
.instances .go-back{
margin-top:17px;
display:inline-block;
}
/*
Responsive image