mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 15:29:59 +02:00
Tried to fix macos shortcuts
This commit is contained in:
parent
e8eb4a41cf
commit
2d62e7d9be
1 changed files with 16 additions and 4 deletions
|
@ -378,9 +378,15 @@ class KeyShortcut {
|
||||||
key.setAttribute('command', this.#action);
|
key.setAttribute('command', this.#action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.#disabled) {
|
||||||
key.setAttribute('disabled', this.#disabled);
|
key.setAttribute('disabled', this.#disabled);
|
||||||
|
}
|
||||||
|
if (this.#reserved) {
|
||||||
key.setAttribute('reserved', this.#reserved);
|
key.setAttribute('reserved', this.#reserved);
|
||||||
|
}
|
||||||
|
if (this.#internal) {
|
||||||
key.setAttribute('internal', this.#internal);
|
key.setAttribute('internal', this.#internal);
|
||||||
|
}
|
||||||
key.setAttribute('zen-keybind', 'true');
|
key.setAttribute('zen-keybind', 'true');
|
||||||
|
|
||||||
return key;
|
return key;
|
||||||
|
@ -731,7 +737,9 @@ class ZenKeyboardShortcutsVersioner {
|
||||||
return newData;
|
return newData;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Error('Unknown keyboar shortcuts version');
|
console.error('Unknown keyboar shortcuts version');
|
||||||
|
this.version = 0;
|
||||||
|
return this.migrateIfNeeded(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
migrate(data, version) {
|
migrate(data, version) {
|
||||||
|
@ -888,3 +896,7 @@ var gZenKeyboardShortcutsManager = {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
window.addEventListener("MozBeforeInitialXULLayout", async () => {
|
||||||
|
await gZenKeyboardShortcutsManager.init();
|
||||||
|
});
|
Loading…
Add table
Add a link
Reference in a new issue