Skip to content

Commit ed84d92

Browse files
committed
Disabled reset settings on update. Bump version => 2.2.1
1 parent a3621de commit ed84d92

File tree

4 files changed

+17
-21
lines changed

4 files changed

+17
-21
lines changed

chromium.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Linux
2-
- Download the latest `.crx` file: [libredirect-2.2.0.crx](https://github.com/libredirect/libredirect/releases/download/v2.2.0/libredirect-2.2.0.crx)
2+
- Download the latest `.crx` file: [libredirect-2.2.1.crx](https://github.com/libredirect/libredirect/releases/download/v2.2.1/libredirect-2.2.1.crx)
33
- Open `chrome://extensions`
44
- Enable `dev mode`
55
- Rerfesh the page
@@ -8,11 +8,11 @@
88
Updates are automatic
99

1010
## Windows, MacOS
11-
- Download the latest release [libredirect-2.2.0.zip](https://github.com/libredirect/libredirect/releases/download/v2.2.0/libredirect-2.2.0.zip)
11+
- Download the latest release [libredirect-2.2.1.zip](https://github.com/libredirect/libredirect/releases/download/v2.2.1/libredirect-2.2.1.zip)
1212
- Unzip it with `Auto detect subfolder`
1313
- Open `chrome://extensions`
1414
- Enable `dev mode`
15-
- Click `Load unpacked`. Select and Open `libredirect-2.2.0/`
15+
- Click `Load unpacked`. Select and Open `libredirect-2.2.1/`
1616

1717
https://user-images.githubusercontent.com/40805353/159987051-8be73cd3-3fdf-4dd0-99d4-8886674fbdb6.mp4
1818

src/pages/background/background.js

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,19 @@ browser.runtime.onInstalled.addListener(
5959
});
6060
})
6161
};
62-
function initDefault() {
62+
if (details.reason == 'install') initDefaults();
6363

64-
}
65-
66-
// if (details.reason == 'install') {
67-
if (details.reason == 'install' || (details.reason == "update" && details.previousVersion != browser.runtime.getManifest().version)) {
68-
if (details.reason == "update")
69-
browser.storage.local.get(null, r => {
70-
if (r.theme) {
71-
const old = encodeURIComponent(JSON.stringify(r))
72-
browser.tabs.create({ url: browser.runtime.getURL(`/pages/background/reset_warning.html?data=${old}`) });
73-
}
74-
initDefaults();
75-
})
76-
else initDefaults();
77-
}
64+
// if (details.reason == 'install' || (details.reason == "update" && details.previousVersion != browser.runtime.getManifest().version)) {
65+
// if (details.reason == "update")
66+
// browser.storage.local.get(null, r => {
67+
// if (r.theme) {
68+
// const old = encodeURIComponent(JSON.stringify(r))
69+
// browser.tabs.create({ url: browser.runtime.getURL(`/pages/background/reset_warning.html?data=${old}`) });
70+
// }
71+
// initDefaults();
72+
// })
73+
// else initDefaults();
74+
// }
7875
}
7976
)
8077

src/pages/options/widgets/general.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function exportSettings() {
4949
}
5050
exportSettings();
5151

52-
browser.storage.onChanged.addListener(exportSettings);
52+
document.getElementById('general_page').addEventListener('click', exportSettings)
5353

5454
let importSettingsElement = document.getElementById("import-settings");
5555
let importSettingsElementText = document.getElementById('import_settings_text');
@@ -93,7 +93,6 @@ importSettingsElement.addEventListener("change",
9393
})
9494

9595
});
96-
9796
} else {
9897
console.log('incompatible settings');
9998
importError()

src/updates/updates.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version='1.0' encoding='UTF-8'?>
22
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
33
<app appid='oladmjdebphlnjjcnomfhhbfdldiimaf'>
4-
<updatecheck codebase='https://github.com/libredirect/libredirect/releases/download/v2.2.0/libredirect-2.2.0.crx' version='2.2.0' />
4+
<updatecheck codebase='https://github.com/libredirect/libredirect/releases/download/v2.2.1/libredirect-2.2.1.crx' version='2.2.1' />
55
</app>
66
</gupdate>

0 commit comments

Comments
 (0)