1
0
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:
Raymond Hill 2020-04-05 09:47:22 -04:00
parent 34a2ef6c42
commit 20332c65b4
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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 }
);
}
/******************************************************************************/