Sven 2 ani în urmă
părinte
comite
1faba9cc3c
1 a modificat fișierele cu 9 adăugiri și 15 ștergeri
  1. 9 15
      BetterYTM.user.js

+ 9 - 15
BetterYTM.user.js

@@ -596,24 +596,20 @@ function onKeyDown(evt)
         // ripped this stuff from the console, most of these are probably unnecessary but this was finnicky af and I am sick and tired of trial and error
         // ripped this stuff from the console, most of these are probably unnecessary but this was finnicky af and I am sick and tired of trial and error
         const defaultProps = {
         const defaultProps = {
             altKey: false,
             altKey: false,
-            bubbles: true,
-            cancelBubble: false,
-            cancelable: true,
-            charCode: 0,
-            composed: true,
             ctrlKey: false,
             ctrlKey: false,
-            currentTarget: null,
-            defaultPrevented: evt.defaultPrevented,
-            explicitOriginalTarget: document.body,
-            isTrusted: true,
             metaKey: false,
             metaKey: false,
-            originalTarget: document.body,
-            repeat: false,
             shiftKey: false,
             shiftKey: false,
-            srcElement: document.body,
             target: document.body,
             target: document.body,
+            currentTarget: document.body,
+            originalTarget: document.body,
+            explicitOriginalTarget: document.body,
+            srcElement: document.body,
             type: "keydown",
             type: "keydown",
-            view: window,
+            bubbles: true,
+            cancelBubble: false,
+            cancelable: true,
+            isTrusted: true,
+            repeat: false,
         };
         };
 
 
         let invalidKey = false;
         let invalidKey = false;
@@ -638,9 +634,7 @@ function onKeyDown(evt)
             };
             };
             break;
             break;
         default:
         default:
-            // console.warn("BetterYTM - Unknown key", evt.code);
             invalidKey = true;
             invalidKey = true;
-
             break;
             break;
         }
         }