Skip to content

Commit

Permalink
Fix: disable ff127 escape at 131+
Browse files Browse the repository at this point in the history
  • Loading branch information
eight04 committed Aug 21, 2024
1 parent 89d9073 commit fc29c90
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/lib/pref.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,19 @@ async function init() {
await browser.storage.local.set({prefInSync: true});
}

// https://bugzilla.mozilla.org/show_bug.cgi?id=1903780
function shouldEscapeFF127() {
const ua = navigator.userAgent;
const isFirefox = /Firefox/.test(ua);
if (!isFirefox) {
return false;
}
const version = ua.match(/Firefox\/(\d+)/)[1];
return parseInt(version, 10) >= 127;
try {
const versionText = ua.match(/Firefox\/(\d+)/)[1];
const version = parseInt(versionText, 10);
return version >= 127 && version < 131;
} catch {
// pass
}
return false;
}

0 comments on commit fc29c90

Please sign in to comment.