aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/options
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2023-05-16 15:38:20 +0300
committerManeraKai <manerakai@protonmail.com>2023-05-16 15:38:20 +0300
commitd7dfe5989a8592d6ec174b562c45cffebbb36354 (patch)
tree14d5a94764393ca95976def24aeda923ee46caa9 /src/pages/options
parentSupporting Frontends Manager better + A small fix (diff)
downloadlibredirect-d7dfe5989a8592d6ec174b562c45cffebbb36354.zip
Re-added LibreSpeed https://github.com/libredirect/browser_extension/issues/170
Diffstat (limited to 'src/pages/options')
-rw-r--r--src/pages/options/index.js18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/pages/options/index.js b/src/pages/options/index.js
index c8eb500d..9480f9a7 100644
--- a/src/pages/options/index.js
+++ b/src/pages/options/index.js
@@ -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"