This commit is contained in:
ManeraKai 2023-05-16 15:38:20 +03:00
parent dc748e8336
commit d7dfe5989a
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
6 changed files with 73 additions and 13 deletions

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="24"
viewBox="0 96 960 960"
width="24"
version="1.1"
id="svg4"
sodipodi:docname="speedTest-icon-light.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="32.416667"
inkscape:cx="8.2365039"
inkscape:cy="12"
inkscape:window-width="1888"
inkscape:window-height="1060"
inkscape:window-x="32"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M418 716q24 24 62 23.5t56-27.5l224-336-336 224q-27 18-28.5 55t22.5 61Zm62-460q59 0 113.5 16.5T696 322l-76 48q-33-17-68.5-25.5T480 336q-133 0-226.5 93.5T160 656q0 42 11.5 83t32.5 77h552q23-38 33.5-79t10.5-85q0-36-8.5-70T766 516l48-76q30 47 47.5 100T880 650q1 57-13 109t-41 99q-11 18-30 28t-40 10H204q-21 0-40-10t-30-28q-26-45-40-95.5T80 656q0-83 31.5-155.5t86-127Q252 319 325 287.5T480 256Zm7 313Z"
id="path2"
style="fill:#ffffff" />
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 96 960 960" width="24"><path d="M418 716q24 24 62 23.5t56-27.5l224-336-336 224q-27 18-28.5 55t22.5 61Zm62-460q59 0 113.5 16.5T696 322l-76 48q-33-17-68.5-25.5T480 336q-133 0-226.5 93.5T160 656q0 42 11.5 83t32.5 77h552q23-38 33.5-79t10.5-85q0-36-8.5-70T766 516l48-76q30 47 47.5 100T880 650q1 57-13 109t-41 99q-11 18-30 28t-40 10H204q-21 0-40-10t-30-28q-26-45-40-95.5T80 656q0-83 31.5-155.5t86-127Q252 319 325 287.5T480 256Zm7 313Z"/></svg>

After

Width:  |  Height:  |  Size: 500 B

View File

@ -719,7 +719,8 @@ const defaultInstances = {
'gothub': ['https://gh.odyssey346.dev'],
'mikuInvidious': ['https://mikuinv.resrv.org'],
"tent": ['https://tent.sny.sh'],
"wolfreeAlpha": ['https://gqq.gitlab.io', 'https://uqq.gitlab.io']
"wolfreeAlpha": ['https://gqq.gitlab.io', 'https://uqq.gitlab.io'],
"libreSpeed": ['https://librespeed.org']
}
function initDefaults() {

View File

@ -774,6 +774,29 @@
"imageType": "svg",
"embeddable": false,
"url": "https://www.wolframalpha.com"
},
"speedTest": {
"frontends": {
"libreSpeed": {
"name": "LibreSpeed",
"instanceList": true,
"url": "https://github.com/librespeed/speedtest"
}
},
"targets": [
"^https?:\\/{2}speedtest\\.libredirect\\.invalid",
"^https?:\\/{2}(www\\.)?fast\\.com\\/",
"^https?:\\/{2}(www\\.)?speedtest\\.net\\/"
],
"name": "Speed Test",
"options": {
"enabled": false,
"unsupportedUrls": "bypass",
"frontend": "libreSpeed"
},
"imageType": "svgMono",
"embeddable": false,
"url": "https://speedtest.libredirect.invalid"
}
}
}

View File

@ -53,7 +53,6 @@ async function changeFrontendsSettings(service) {
}
if (document.getElementById(`${service}-redirectType`)) {
const frontend = options[service].frontend
console.log(frontend)
if (config.services[service].frontends[frontend].embeddable) {
document.getElementById(`${service}-redirectType`).innerHTML = `
<option value="both" data-localise="__MSG_both__">both</options>
@ -237,7 +236,8 @@ function createList(frontend, networks, document, redirects, blacklist) {
const warnings = [cloudflare].join(" ")
return `<div class="frontend">
<x>
<a href="${x}" target="_blank">${x}</a>${warnings}
<a href="${x}" target="_blank">${x}</a>
${warnings}
</x>
<button class="add add-${x}">
<svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
@ -291,17 +291,13 @@ async function ping(frontend) {
if (time < 5000) {
text = `${time}ms`
if (time <= 1000) { color = "green" }
if (time <= 1000) color = "green"
else if (time <= 2000) color = "orange"
}
else if (time >= 5000) {
color = "red"
if (time == 5000) {
text = "5000ms+"
}
if (time > 5000) {
text = `Error: ${time - 5000}`
}
if (time == 5000) text = "5000ms+"
if (time > 5000) text = `Error: ${time - 5000}`
}
else {
color = "red"

View File

@ -119,7 +119,7 @@ section.links {
flex-wrap: wrap;
flex-direction: column;
width: 300px;
max-height: 720px;
max-height: 750px;
}
section.links div {