Trying to fix crash

This commit is contained in:
FlamedDogo99 2024-06-10 09:52:11 -06:00
parent 148885566a
commit 693b37b7ef

View File

@ -15,7 +15,7 @@
// THIS IS LAZY AND DANGEROUS AND CAN EXPOSE USERSCRIPT INTERNALS SO PLEASE REMOVE // 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 { try {
unsafeWindow.console.log("UNSAFE WINDOW"); unsafeWindow.console.log("UNSAFE WINDOW RAGGHHH")
alert("DANGER: This userscript is temporarily using unsafeWindow for testing purposes. Unsafe websites could potentially use this to gain access to data and other content that the browser normally wouldn't allow!") alert("DANGER: This userscript is temporarily using unsafeWindow for testing purposes. Unsafe websites could potentially use this to gain access to data and other content that the browser normally wouldn't allow!")
} catch { } catch {
Object.defineProperty(window, "unsafeWindow", { Object.defineProperty(window, "unsafeWindow", {
@ -411,8 +411,7 @@ function insertCanvasElements() {
unsafeWindow.console.log(`Received input by ${e.inputType}: ${e.data} -> ${inputData}`); unsafeWindow.console.log(`Received input by ${e.inputType}: ${e.data} -> ${inputData}`);
unsafeWindow.lastKey = inputData unsafeWindow.lastKey = inputData
// TEMP ADD BACK //hiddenInput.value = " ";
// hiddenInput.value = " "; // We need a character to detect deleting
if(unsafeWindow.keyboardFix) { if(unsafeWindow.keyboardFix) {
const sliceInputType = e.inputType.slice(0,1); // This is a really dumb way to do this because it's not future-proof const sliceInputType = e.inputType.slice(0,1); // This is a really dumb way to do this because it's not future-proof
if(sliceInputType== 'i') { if(sliceInputType== 'i') {