File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 26
26
/******************************************************************************/
27
27
28
28
µBlock . canUseShortcuts = vAPI . commands instanceof Object ;
29
- µBlock . canUpdateShortcuts = µBlock . canUseShortcuts &&
30
- typeof vAPI . commands . update === 'function' ;
29
+
30
+ // https://github.com/uBlockOrigin/uBlock-issues/issues/386
31
+ // Firefox 74 and above has complete shotcut assignment user interface.
32
+ µBlock . canUpdateShortcuts =
33
+ µBlock . canUseShortcuts &&
34
+ vAPI . webextFlavor . soup . has ( 'firefox' ) &&
35
+ typeof vAPI . commands . update === 'function' ;
36
+
37
+ if ( µBlock . canUpdateShortcuts ) {
38
+ self . addEventListener (
39
+ 'webextFlavor' ,
40
+ ( ) => { µBlock . canUpdateShortcuts = vAPI . webextFlavor . major < 74 ; } ,
41
+ { once : true }
42
+ ) ;
43
+ }
31
44
32
45
/******************************************************************************/
33
46
You can’t perform that action at this time.
0 commit comments