Skip to content

Commit c065bb9

Browse files
committed
fix: re-enable oauth in fixed firefox versions (fixes #80)
1 parent bb4b2fa commit c065bb9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/options.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,19 @@ class AccountManager extends window.StorageManager {
9696

9797
const typeForm = this.form.querySelector("select");
9898

99+
browser.runtime.getBrowserInfo()
100+
.then(({ version }) => {
101+
const [ major ] = version.split('.');
102+
if(parseInt(major, 10) >= 60) {
103+
const disabledOptions = typeForm.querySelectorAll('option[disabled]');
104+
typeForm.querySelector('option[selected]').selected = false;
105+
for(const option of disabledOptions) {
106+
option.disabled = false;
107+
}
108+
}
109+
})
110+
.catch(console.error);
111+
99112
browser.storage.onChanged.addListener((changes, areaName) => {
100113
if(areaName === "local" && "handlers" in changes) {
101114
const handlerIds = new Set();

0 commit comments

Comments
 (0)