mirror of
https://github.com/FlamedDogo99/EaglerMobile.git
synced 2024-11-09 14:06:05 -08:00
Update eaglermobile.user.js
This commit is contained in:
parent
20216ee4ad
commit
60fe827c13
|
@ -65,8 +65,14 @@ Object.defineProperty(EventTarget.prototype, "addEventListener", {
|
||||||
}
|
}
|
||||||
return fn.apply(this, args);
|
return fn.apply(this, args);
|
||||||
}, ...rest);
|
}, ...rest);
|
||||||
|
} else if (type == 'blur' || type == 'mouseleave') {
|
||||||
|
_addEventListener.call(this, type, function(...args) {
|
||||||
|
return;
|
||||||
|
}, ...rest);
|
||||||
} else {
|
} else {
|
||||||
_addEventListener.call(this, type, fn, ...rest);
|
_addEventListener.call(this, type, function(...args) {
|
||||||
|
return fn.apply(this, args);
|
||||||
|
}, ...rest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -495,7 +501,27 @@ function insertCanvasElements() {
|
||||||
document.body.appendChild(pauseButton);
|
document.body.appendChild(pauseButton);
|
||||||
let chatButton = createTouchButton("chatButton", "inGame");
|
let chatButton = createTouchButton("chatButton", "inGame");
|
||||||
chatButton.style.cssText = "top: 0vh; margin: auto; left: 0vh; right: 16vh; width: 8vh; height: 8vh;"
|
chatButton.style.cssText = "top: 0vh; margin: auto; left: 0vh; right: 16vh; width: 8vh; height: 8vh;"
|
||||||
chatButton.addEventListener("touchstart", function(e){keyEvent("t", "keydown")}, false);
|
chatButton.addEventListener("touchstart", function(e){ // Trying to figure out why the input isn't focusing
|
||||||
|
canvas.dispatchEvent(new Event("focus", {
|
||||||
|
returnValue: true,
|
||||||
|
srcElement: canvas,
|
||||||
|
target: canvas,
|
||||||
|
timeStamp: 1
|
||||||
|
}));
|
||||||
|
canvas.dispatchEvent(new MouseEvent("mouseenter", {
|
||||||
|
offsetX: 1,
|
||||||
|
offsetY: 1,
|
||||||
|
pageX: 1,
|
||||||
|
pageY: 1,
|
||||||
|
screenX: 1,
|
||||||
|
screenY: 1,
|
||||||
|
x: 1,
|
||||||
|
y: 1,
|
||||||
|
target: canvas,
|
||||||
|
toElement: canvas,
|
||||||
|
}));
|
||||||
|
keyEvent("t", "keydown")
|
||||||
|
}, false);
|
||||||
document.body.appendChild(chatButton);
|
document.body.appendChild(chatButton);
|
||||||
let perspectiveButton = createTouchButton("perspectiveButton", "inGame");
|
let perspectiveButton = createTouchButton("perspectiveButton", "inGame");
|
||||||
perspectiveButton.style.cssText = "top: 0vh; margin: auto; left: 0vh; right: 0vh; width: 8vh; height: 8vh;"
|
perspectiveButton.style.cssText = "top: 0vh; margin: auto; left: 0vh; right: 0vh; width: 8vh; height: 8vh;"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user