aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/options/index.js
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2023-01-30 15:46:10 +0300
committerManeraKai <manerakai@protonmail.com>2023-01-30 15:46:10 +0300
commit21e87a6412b4dac679846884af16f744bc152eca (patch)
tree77b1d67e150fb77a1c5b19dee8ee22e6dad6d255 /src/pages/options/index.js
parentUpdated screenshots (diff)
downloadlibredirect-21e87a6412b4dac679846884af16f744bc152eca.zip
Fixed locales and other typing stuff
Diffstat (limited to 'src/pages/options/index.js')
-rw-r--r--src/pages/options/index.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/pages/options/index.js b/src/pages/options/index.js
index 7b560248..c6c21095 100644
--- a/src/pages/options/index.js
+++ b/src/pages/options/index.js
@@ -6,11 +6,13 @@ let config,
divs = {}
for (const a of document.getElementById("links").getElementsByTagName("a")) {
- a.addEventListener("click", e => {
- const path = a.getAttribute("href").replace("#", "")
- loadPage(path)
- e.preventDefault()
- })
+ if (!a.href.includes("https://")) {
+ a.addEventListener("click", e => {
+ const path = a.getAttribute("href").replace("#", "")
+ loadPage(path)
+ e.preventDefault()
+ })
+ }
}
config = await utils.getConfig()
@@ -55,7 +57,7 @@ async function loadPage(path) {
window.history.pushState({ id: "100" }, "Page 2", `/pages/options/index.html#${path}`)
- if (path != 'general' && path != 'about') {
+ if (path != 'general') {
const service = path;
divs[service] = {}
@@ -72,7 +74,7 @@ async function loadPage(path) {
else
options[service][option] = divs[service][option].value
browser.storage.local.set({ options })
- changeFrontendsSettings(service)
+ changeFrontendsSettings(service)
})
}