aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/options
diff options
context:
space:
mode:
authorHygna <hygna@proton.me>2022-09-30 14:54:56 +0100
committerHygna <hygna@proton.me>2022-09-30 14:54:56 +0100
commit18facf37a2f058b1314f5fd3a1f9d36c70ba27f5 (patch)
tree5042ecbc2172c95a7a505ae71a7f3e263dfaa1d8 /src/pages/options
parentChanges: (diff)
downloadlibredirect-18facf37a2f058b1314f5fd3a1f9d36c70ba27f5.zip
Squashed a few bugs
Diffstat (limited to 'src/pages/options')
-rw-r--r--src/pages/options/index.html14
-rw-r--r--src/pages/options/widgets/general.js2
-rw-r--r--src/pages/options/widgets/services.js2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/pages/options/index.html b/src/pages/options/index.html
index 6ef33723..71d04fd0 100644
--- a/src/pages/options/index.html
+++ b/src/pages/options/index.html
@@ -84,7 +84,7 @@
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path>
</svg>
- <a href="#sendTargets" data-localise="__MSG_sendTargets__">Send Files</a></div>
+ <a href="#uploadFiles" data-localise="__MSG_uploadFiles__">Send Files</a></div>
<div class="title"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="currentColor">
<path d="M11 17h2v-6h-2Zm1-8q.425 0 .713-.288Q13 8.425 13 8t-.287-.713Q12.425 7 12 7t-.712.287Q11 7.575 11 8t.288.712Q11.575 9 12 9Zm0 13q-2.075 0-3.9-.788-1.825-.787-3.175-2.137-1.35-1.35-2.137-3.175Q2 14.075 2 12t.788-3.9q.787-1.825 2.137-3.175 1.35-1.35 3.175-2.138Q9.925 2 12 2t3.9.787q1.825.788 3.175 2.138 1.35 1.35 2.137 3.175Q22 9.925 22 12t-.788 3.9q-.787 1.825-2.137 3.175-1.35 1.35-3.175 2.137Q14.075 22 12 22Zm0-2q3.35 0 5.675-2.325Q20 15.35 20 12q0-3.35-2.325-5.675Q15.35 4 12 4 8.65 4 6.325 6.325 4 8.65 4 12q0 3a.35 2.325 5.675Q8.65 20 12 20Zm0-8Z"></path>
</svg>
@@ -318,9 +318,9 @@
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path>
</svg>
- <x data-localise="__MSG_sendTargets__">Send Files</x>
+ <x data-localise="__MSG_uploadFiles__">Send Files</x>
</div>
- <input id="sendTargets" type="checkbox">
+ <input id="uploadFiles" type="checkbox">
</div>
</div>
@@ -2818,7 +2818,7 @@
<h4 data-localise="__MSG_frontend__">Frontend</h4>
<select id="translate-frontend">
<option value="simplyTranslate">SimplyTranslate</option>
- <option value="lingva">Lingva</option>
+ <option value="lingva">Lingva Translate</option>
</select>
</div>
@@ -3134,14 +3134,14 @@
</div>
</section>
-<section class="option-block" id="sendTargets_page">
+<section class="option-block" id="uploadFiles_page">
<div class="some-block option-block">
- <h1 data-localise="__MSG_sendTargets__">Send Files</h1>
+ <h1 data-localise="__MSG_uploadFiles__">Send Files</h1>
</div>
<hr>
<div class="some-block option-block">
<h4 data-localise="__MSG_enable__">Enable</h4>
- <input id="sendTargets-enabled" type="checkbox">
+ <input id="uploadFiles-enabled" type="checkbox">
</div>
<hr>
<div id="send">
diff --git a/src/pages/options/widgets/general.js b/src/pages/options/widgets/general.js
index 23ed73ee..cd5cfb47 100644
--- a/src/pages/options/widgets/general.js
+++ b/src/pages/options/widgets/general.js
@@ -37,7 +37,6 @@ function setOption(option, multiChoice, event) {
browser.storage.local.get("options", r => {
let options = r.options
if (multiChoice) {
- console.log(event.target.options)
options[option] = event.target.options[event.target.options.selectedIndex].value
} else {
options[option] = event.target.checked
@@ -95,6 +94,7 @@ resetSettings.addEventListener("click", async () => {
.then(response => response.text())
.then(async data => {
browser.storage.local.set({ blacklists: JSON.parse(data) }, async () => {
+ await generalHelper.initDefaults()
await servicesHelper.initDefaults()
location.reload()
})
diff --git a/src/pages/options/widgets/services.js b/src/pages/options/widgets/services.js
index 873950f3..98e068a1 100644
--- a/src/pages/options/widgets/services.js
+++ b/src/pages/options/widgets/services.js
@@ -77,7 +77,7 @@ function changeNetworkSettings() {
changeNetworkSettings()
for (const service in config.services) {
divs[service] = {}
- divs[service][service] = document.getElementById(`${service}_page`)
+ //divs[service].page = document.getElementById(`${service}_page`)
for (const option in config.services[service].options) {
divs[service][option] = document.getElementById(`${service}-${option}`)