mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
No need for "Shortcuts" pane in Firefox 74 and above
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/386
This commit is contained in:
parent
34a2ef6c42
commit
20332c65b4
@ -26,8 +26,21 @@
|
||||
/******************************************************************************/
|
||||
|
||||
µBlock.canUseShortcuts = vAPI.commands instanceof Object;
|
||||
µBlock.canUpdateShortcuts = µBlock.canUseShortcuts &&
|
||||
typeof vAPI.commands.update === 'function';
|
||||
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/386
|
||||
// Firefox 74 and above has complete shotcut assignment user interface.
|
||||
µBlock.canUpdateShortcuts =
|
||||
µBlock.canUseShortcuts &&
|
||||
vAPI.webextFlavor.soup.has('firefox') &&
|
||||
typeof vAPI.commands.update === 'function';
|
||||
|
||||
if ( µBlock.canUpdateShortcuts ) {
|
||||
self.addEventListener(
|
||||
'webextFlavor',
|
||||
( ) => { µBlock.canUpdateShortcuts = vAPI.webextFlavor.major < 74; },
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user