mirror of
https://github.com/FlamedDogo99/EaglerMobile.git
synced 2024-11-21 11:36:05 -08:00
commit
7bde006d28
|
@ -13,6 +13,15 @@
|
|||
// ==/UserScript==
|
||||
|
||||
|
||||
function isMobile() {
|
||||
try {
|
||||
document.createEvent("TouchEvent");
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(!isMobile()){alert("WARNING: This script doesn't play well with non-mobile browsers. Proceed at your own risk!")};
|
||||
// Hides inventory button
|
||||
window.inInventory = false;
|
||||
// Used for changing touchmove events to mousemove events
|
||||
|
@ -298,6 +307,18 @@ function insertCanvasElements() {
|
|||
exitButton.addEventListener("touchend", function(e){keyEvent("À", "keyup")}, false);
|
||||
exitButton.addEventListener("touchmove", function(e){e.preventDefault()}, false);
|
||||
document.body.appendChild(exitButton);
|
||||
var hiddenInput = document.createElement('input');
|
||||
hiddenInput.id = "hiddenInput"
|
||||
hiddenInput.style.cssText = "opacity:0;z-index:-99999";
|
||||
document.body.appendChild(hiddenInput);
|
||||
var keyboardButton = document.createElement('button');
|
||||
keyboardButton.id = "keyboardButton"
|
||||
keyboardButton.textContent = "⌨️";
|
||||
keyboardButton.style.cssText = "left:10vh;top:0vh;"
|
||||
keyboardButton.addEventListener("touchstart", function(e){e.preventDefault();hiddenInput.blur()}, false);
|
||||
keyboardButton.addEventListener("touchend", function(e){hiddenInput.select()}, false);
|
||||
keyboardButton.addEventListener("touchmove", function(e){e.preventDefault()}, false);
|
||||
document.body.appendChild(keyboardButton);
|
||||
var placeButton = document.createElement('button');
|
||||
placeButton.id = "hideButton"
|
||||
placeButton.textContent = "⊹";
|
||||
|
|
Loading…
Reference in New Issue
Block a user