diff options
author | ManeraKai <manerakai@protonmail.com> | 2023-01-18 18:14:00 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2023-01-18 18:14:00 +0300 |
commit | 26624ea716f96b14b49be3e5ded1279932a3ee6f (patch) | |
tree | 534f3fb2d5efbca141a431cadb8606644562cc2d /src/pages/options/widgets | |
parent | Fixed /new not redirecting in reddit + removed simpleertube completely (diff) | |
download | libredirect-26624ea716f96b14b49be3e5ded1279932a3ee6f.zip |
Modified the settings convertion for the next release
Diffstat (limited to 'src/pages/options/widgets')
-rw-r--r-- | src/pages/options/widgets/general.js | 17 | ||||
-rw-r--r-- | src/pages/options/widgets/services.pug | 7 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/pages/options/widgets/general.js b/src/pages/options/widgets/general.js index 63938d78..f08d8313 100644 --- a/src/pages/options/widgets/general.js +++ b/src/pages/options/widgets/general.js @@ -57,19 +57,16 @@ importSettingsElement.addEventListener("change", () => { reader.readAsText(file) reader.onload = async () => { const data = JSON.parse(reader.result) - if ("theme" in data && "disableImgur" in data && "imgurRedirects" in data) { + if ( + "theme" in data + && data.version == browser.runtime.getManifest().version + ) { browser.storage.local.clear(async () => { await generalHelper.initDefaults() await servicesHelper.initDefaults() - await servicesHelper.upgradeOptions() - location.reload() - }) - } else if ("version" in data) { - let options = data - delete options.version - browser.storage.local.set({ options: data }, async () => { - await servicesHelper.processUpdate() - location.reload() + browser.storage.local.set({ options: data }, () => { + location.reload() + }) }) } else { console.log("incompatible settings") diff --git a/src/pages/options/widgets/services.pug b/src/pages/options/widgets/services.pug index 22b8ab2d..5bda5d3f 100644 --- a/src/pages/options/widgets/services.pug +++ b/src/pages/options/widgets/services.pug @@ -49,7 +49,10 @@ each val, service in services svg(xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor") path(d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z") - div(class="checklist custom-checklist") + div(class="checklist custom-checklist") + each val, network in networks div(class=network) - div(class="checklist") \ No newline at end of file + div(class="checklist") + if (network == 'clearnet') + div(class="some-block option-block") Loading... \ No newline at end of file |