mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #2524 from keepassxreboot/feature/add_support_for_firefox_shortcuts_page
Add support for opening Firefox shortcut settings page
This commit is contained in:
commit
dccf307e0c
1 changed files with 13 additions and 1 deletions
|
|
@ -200,9 +200,21 @@ options.initGeneralSettings = async function() {
|
|||
});
|
||||
|
||||
$('#configureCommands').addEventListener('click', function() {
|
||||
if (isFirefox()) {
|
||||
if (typeof(browser.commands.openShortcutSettings) === 'function') {
|
||||
browser.commands.openShortcutSettings();
|
||||
} else {
|
||||
// TODO: Remove internal shortcuts page after Firefox ESR has support for openShortcutSettings()
|
||||
browser.tabs.create({
|
||||
url: browser.runtime.getURL('options/shortcuts.html')
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const scheme = isEdge() ? 'edge' : 'chrome';
|
||||
browser.tabs.create({
|
||||
url: isFirefox() ? browser.runtime.getURL('options/shortcuts.html') : `${scheme}://extensions/shortcuts`
|
||||
url: `${scheme}://extensions/shortcuts`
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue