mirror of
https://github.com/FlamedDogo99/EaglerMobile.git
synced 2024-11-22 20:16:04 -08:00
Detecting 229 code
This commit is contained in:
parent
dc446b3176
commit
e4411c09a8
|
@ -12,17 +12,10 @@
|
||||||
// @grant unsafeWindow
|
// @grant unsafeWindow
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
// THIS IS LAZY AND CAN EXPOSE INTERNALS
|
// THIS IS LAZY AND DANGEROUS AND CAN EXPOSE USERSCRIPT INTERNALS SO PLEASE REMOVE
|
||||||
// IN THE FUTURE, JUST INJECT A SCRIPT TAG
|
// IN THE FUTURE, JUST INJECT A SCRIPT TAG
|
||||||
//try {
|
|
||||||
//var window = unsafeWindow ?? window
|
|
||||||
//} catch {
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
try {
|
try {
|
||||||
if(unsafeWindow) {
|
unsafeWindow.console.log("UNSAFE WINDOW RAGGHHH")
|
||||||
console.log("UNSAFE WINDOW RAGGHHH")
|
|
||||||
}
|
|
||||||
} catch {
|
} catch {
|
||||||
Object.defineProperty(window, "unsafeWindow", {
|
Object.defineProperty(window, "unsafeWindow", {
|
||||||
value: window
|
value: window
|
||||||
|
@ -437,7 +430,7 @@ function insertCanvasElements() {
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
hiddenInput.addEventListener("keydown", function(e) {
|
hiddenInput.addEventListener("keydown", function(e) {
|
||||||
if(!(e.key && e.keyCode && e.which) && !unsafeWindow.keyboardFix) {
|
if((e.keyCode = 229 || e.which = 229) && !unsafeWindow.keyboardFix) {
|
||||||
unsafeWindow.console.warn("Switching from keydown to input events due to invalid KeyboardEvent. Some functionality will be lost.")
|
unsafeWindow.console.warn("Switching from keydown to input events due to invalid KeyboardEvent. Some functionality will be lost.")
|
||||||
unsafeWindow.keyboardFix = true;
|
unsafeWindow.keyboardFix = true;
|
||||||
if(unsafeWindow.lastKey) {
|
if(unsafeWindow.lastKey) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user