From 07d235b46bd8673d2aa7513d701b61b5440eef08 Mon Sep 17 00:00:00 2001 From: jrc03c Date: Fri, 1 Jul 2022 08:32:04 -0500 Subject: [PATCH 1/2] Fixes a bug in Firefox where the Firefox version wasn't being correctly parsed. --- keepassxc-browser/options/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keepassxc-browser/options/options.js b/keepassxc-browser/options/options.js index efeaf89..5355ea7 100644 --- a/keepassxc-browser/options/options.js +++ b/keepassxc-browser/options/options.js @@ -662,7 +662,7 @@ options.initAbout = function() { $('#tab-about span.kpxcbrBrowser').textContent = getBrowserId(); // Hides keyboard shortcut configure button if Firefox version is < 60 (API is not compatible) - if (isFirefox() && Number(navigator.userAgent.substr(navigator.userAgent.lastIndexOf('/') + 1, 2)) < 60) { + if (isFirefox() && Number(navigator.userAgent.substring(navigator.userAgent.lastIndexOf('/') + 1)) < 60) { $('#chrome-only').remove(); } }; From c1563edf88099020e3c89b0a9ba2fb40877d50f8 Mon Sep 17 00:00:00 2001 From: jrc03c Date: Fri, 1 Jul 2022 08:58:48 -0500 Subject: [PATCH 2/2] According to @varjolintu's comment on the PR (https://github.com/keepassxreboot/keepassxc-browser/pull/1662), this bit of code actually just needs to be removed altogether. So, this commit removes it. --- keepassxc-browser/options/options.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/keepassxc-browser/options/options.js b/keepassxc-browser/options/options.js index 5355ea7..cbbf607 100644 --- a/keepassxc-browser/options/options.js +++ b/keepassxc-browser/options/options.js @@ -660,11 +660,6 @@ options.initAbout = function() { $('#tab-about span.kpxcbrVersion').textContent = version; $('#tab-about span.kpxcbrOS').textContent = platform; $('#tab-about span.kpxcbrBrowser').textContent = getBrowserId(); - - // Hides keyboard shortcut configure button if Firefox version is < 60 (API is not compatible) - if (isFirefox() && Number(navigator.userAgent.substring(navigator.userAgent.lastIndexOf('/') + 1)) < 60) { - $('#chrome-only').remove(); - } }; options.initTheme = function() {