mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 17:17:57 +01:00
This commit is contained in:
parent
07c7c3d944
commit
b5016a1f7a
1 changed files with 6 additions and 1 deletions
|
@ -106,7 +106,12 @@ var onPSLReady = function() {
|
|||
var onCommandShortcutsReady = function(commandShortcuts) {
|
||||
if ( Array.isArray(commandShortcuts) === false ) { return; }
|
||||
µb.commandShortcuts = new Map(commandShortcuts);
|
||||
if ( typeof vAPI.commands.update !== 'function' ) { return; }
|
||||
if (
|
||||
vAPI.commands === undefined ||
|
||||
typeof vAPI.commands.update !== 'function'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
for ( let entry of commandShortcuts ) {
|
||||
vAPI.commands.update({ name: entry[0], shortcut: entry[1] });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue