mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-17 23:32:02 +00:00
Added a "copy current url" shortcut
This commit is contained in:
@@ -66,6 +66,7 @@ const defaultKeyboardGroups = {
|
||||
'zen-search-find-again-shortcut-prev',
|
||||
],
|
||||
pageOperations: [
|
||||
'zen-text-action-copy-url-shortcut',
|
||||
'zen-location-open-shortcut',
|
||||
'zen-location-open-shortcut-alt',
|
||||
'zen-save-page-shortcut',
|
||||
@@ -702,7 +703,7 @@ function zenGetDefaultShortcuts() {
|
||||
}
|
||||
|
||||
class ZenKeyboardShortcutsVersioner {
|
||||
static LATEST_KBS_VERSION = 5;
|
||||
static LATEST_KBS_VERSION = 6;
|
||||
|
||||
constructor() {}
|
||||
|
||||
@@ -822,6 +823,21 @@ class ZenKeyboardShortcutsVersioner {
|
||||
)
|
||||
);
|
||||
}
|
||||
if (version < 6) {
|
||||
// Migrate from 5 to 6
|
||||
// In this new version, we add the "Copy URL" shortcut to the default shortcuts
|
||||
data.push(
|
||||
new KeyShortcut(
|
||||
'zen-copy-url',
|
||||
'C',
|
||||
'',
|
||||
ZEN_OTHER_SHORTCUTS_GROUP,
|
||||
KeyShortcutModifiers.fromObject({ accel: true, shift: true }),
|
||||
'code:gZenCommonActions.copyCurrentURLToClipboard()',
|
||||
'zen-text-action-copy-url-shortcut'
|
||||
)
|
||||
);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user