Re-added LibreSpeed https://github.com/libredirect/browser_extension/issues/170
This commit is contained in:
parent
dc748e8336
commit
d7dfe5989a
|
@ -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 |
|
@ -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 |
|
@ -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() {
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>
|
||||
|
@ -161,8 +160,8 @@ async function calcCustomInstances(frontend) {
|
|||
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<hr>`
|
||||
</div>
|
||||
<hr>`
|
||||
)
|
||||
.join("\n")
|
||||
for (const item of customInstances) {
|
||||
|
@ -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"
|
||||
|
|
|
@ -119,7 +119,7 @@ section.links {
|
|||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
width: 300px;
|
||||
max-height: 720px;
|
||||
max-height: 750px;
|
||||
}
|
||||
|
||||
section.links div {
|
||||
|
|
Loading…
Reference in New Issue