aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/options
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2023-01-19 20:32:32 +0300
committerManeraKai <manerakai@protonmail.com>2023-01-19 20:32:36 +0300
commit6f338f2c66cf291a8f3a49c4a7a6d867ef7fe88f (patch)
tree25f427a288626438882979375a39eaa636d3be0c /src/pages/options
parentRemoved Bibliogram https://github.com/libredirect/libredirect/issues/573 (diff)
downloadlibredirect-6f338f2c66cf291a8f3a49c4a7a6d867ef7fe88f.zip
UX/UI tweaks
Diffstat (limited to 'src/pages/options')
-rw-r--r--src/pages/options/init.js12
-rw-r--r--src/pages/options/new_release.html1
-rw-r--r--src/pages/options/widgets/services.pug2
3 files changed, 13 insertions, 2 deletions
diff --git a/src/pages/options/init.js b/src/pages/options/init.js
index cac23748..015daac7 100644
--- a/src/pages/options/init.js
+++ b/src/pages/options/init.js
@@ -9,18 +9,30 @@ function changeTheme() {
case "dark":
document.body.classList.add("dark-theme")
document.body.classList.remove("light-theme")
+ for (const element of document.body.getElementsByClassName('dark')) {
+ element.style.display = 'none';
+ }
break
case "light":
document.body.classList.add("light-theme")
document.body.classList.remove("dark-theme")
+ for (const element of document.body.getElementsByClassName('light')) {
+ element.style.display = 'none';
+ }
break
default:
if (matchMedia("(prefers-color-scheme: light)").matches) {
document.body.classList.add("light-theme")
document.body.classList.remove("dark-theme")
+ for (const element of document.body.getElementsByClassName('light')) {
+ element.style.display = 'none';
+ }
} else {
document.body.classList.add("dark-theme")
document.body.classList.remove("light-theme")
+ for (const element of document.body.getElementsByClassName('dark')) {
+ element.style.display = 'none';
+ }
}
}
resolve()
diff --git a/src/pages/options/new_release.html b/src/pages/options/new_release.html
deleted file mode 100644
index 953f61d4..00000000
--- a/src/pages/options/new_release.html
+++ /dev/null
@@ -1 +0,0 @@
-Many things happenned in the past months. LibRedirect has gone through some hard decisions; removed Unify Settings, Test Latency, \ No newline at end of file
diff --git a/src/pages/options/widgets/services.pug b/src/pages/options/widgets/services.pug
index 5bda5d3f..c321012a 100644
--- a/src/pages/options/widgets/services.pug
+++ b/src/pages/options/widgets/services.pug
@@ -2,7 +2,7 @@ each val, service in services
section(class="option-block" id=service+"_page")
div(class="some-block option-block")
h1
- a(href=services[service].url)=services[service].name
+ a(target="_blank" href=services[service].url)=services[service].name
hr