EaglerMobile

A userscript that allows EaglerCraft to run on mobile browsers. As of June 15, 2023, the Eagler Mobile script is directly integrated with the main EaglerCraft website!

APACHE-2.0 License

Stars
15
Committers
3

Bot releases are visible (Hide)

EaglerMobile - Eagler Mobile v3.0.5b Latest Release

Published by FlamedDogo99 4 months ago

Touch Controls Update

  • Rewrote touch controls handling (See readme for controls)
    • Crafting tables and other GUI can now easily be used (See #21)
  • Fixes text selection on Mobile controls
    • Fixes the rest of #15
  • Removed unsafeWindow reference left over from testing

What's Changed

What's Next

  • Dynamic enabling and disabling features
  • Full GamePad support
  • EaglerForge version rewrite (See #28 for details)

Full Changelog: https://github.com/FlamedDogo99/EaglerMobile/compare/v3.0.4...v3.0.5

EaglerMobile - Eagler Mobile v3.0.4

Published by FlamedDogo99 4 months ago

What's Changed

  1. Compatibility mode now uses beforeinput instead of input
    • beforeinput does not require the input to contain text to detect deletion
    • Fixes #7 and #13
  2. keyboardEnabled has been replaced with hiddenInputFocused
    • The keyboard button previously just called select or blur based on clientWindow.keyboardEnabled. When the user dismissed the keyboard without pressing the keyboardButton, they would need to repress the button twice to enable the keyboard. This change makes it call select and blur based on the focus state, eliminating that issue
  3. toggleKeyboard no longer exists, and has been moved inside of the keyboardButton touch event listener
    • By moving the script for toggling the keyboard into the event listener, we can directly reference hiddenInput without needing to use querySelector again
  4. Compatibility mode has been completely reworked
    • Some Android devices only dispatch input events with inputType set to insertCompositionText, even with deletion. There now is a check for that. This change also allows detecting the enter key from insertLineBreak.
    • Fixes #18
  5. html, body, and canvas now have a height: 100 svh before -webkit-fill-available
    • Previously Android Chrome and FireFox had content hidden by the navigation bar. This change fixes that.
  6. Better comments and documentation have been added

Tested On

  • MacOS Brave
  • MacOS Safari: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
  • iOS Safari: Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1
    • Tested on Xcode Simulator
  • Android Chrome: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36
  • Android Firefox: Mozilla/5.0 (Android 10; Mobile; rv:126.0) Gecko/126.0 Firefox/126.0

Full Changelog: https://github.com/FlamedDogo99/EaglerMobile/compare/v3.0.3...v3.0.4

EaglerMobile - Eagler Mobile v3.0.3

Published by FlamedDogo99 4 months ago

Changes

Possibly resolves #15 and #7

  1. All calls to window are now clientWindow
    • Tampermonkey does not allow Userscripts to run outside of the sandbox, while the iOS Userscripts app does. This change allows the window object to be used when unsafeWindow is undefined.
  2. Added inputFix window state, which is turned on when double input events are detected
    • Some Android devices dispatch an additional input event when the input element is programmatically updated. When we set the input for the first time as the DOM loads, we can see if this is happening. If it is, we ignore every other duplicate key press.
  3. Added CSS and eventListener to prevent long presses on Chrome triggering the save-image dialog
    • To use the touch controls, the user is required to hold or drag on buttons. On iOS Chrome, this causes the save-image dialog to appear. This change should prevent that.

Relevant Issues

Full Changelog: https://github.com/FlamedDogo99/EaglerMobile/compare/v3.0.2...v3.03

EaglerMobile - Eagler Mobile v3.0.2

Published by FlamedDogo99 5 months ago

Bug Fixes: File Uploads

  • Rewrote Document.prototype.createEvent injected function to fix #11 and avoid conflicts causing crashes with #7.

What's Changed

Full Changelog: https://github.com/FlamedDogo99/EaglerMobile/compare/v3.0.1...v3.0.2

EaglerMobile - EaglerCraft 3.0.1

Published by FlamedDogo99 5 months ago

Big changes!

Keyboard support (Android and iOS):

  • Added window.keyboardFix, which controls wether keydown or input events are used for keyboard capture.
  • Added input monitoring to seamlessly transition between window.keyboardFix states

Better keyEvent functions

  • Consolidated shiftKeyEvent(), deleteKeyEvent(), and keyEvent() into a single keyEvent function that supports more keys
  • All keyboardEvents should either be called through keyEvent() or set event.isValid to true to allow the input keyboard events to work

Fake pointerlock and fullscreen API

  • Pointerlock and the fullscreen API are read-only on some mobile devices, even though they had no functionality. This is now no longer the case

What's Changed

Full Changelog: https://github.com/FlamedDogo99/EaglerMobile/compare/v2.4...v3.0.1

EaglerMobile - Eagler Mobile 2.4

Published by FlamedDogo99 5 months ago

Eagler Mobile

A userscript that allows eaglercraft to run on mobile devices

To-do

  • Gamepad support
  • Cancel button for file upload
  • Styling for file upload
  • Back button for Kiwi browser?
  • Fix keyboard input for Android devices

Implemented

  • Fake pointerlock API (tricks the client into loading)
  • Fake fullscreen API (so that selecting full screen doesn't crash the client)
  • Custom upload button for files (because safari is a pain with button clicks)
  • Fake mousemove events (Allows touch and drag to simulate mouse movement)
  • Fake cursor scroll events (Allows scrolling through hotbar and in menus)
  • On-screen controls (Movement, block placement/removal/picking, inventory, item dropping, keyboard, and exiting keys)
  • Styling for html, body, and canvas (So that the canvas doesn't ignore the navigation bars for viewport sizing)
  • Strafe buttons when holding forward
  • Crouch lock on hold
  • Re-orginize button layout
  • Redo the display button functions
  • Sprint button (sperate from double tapping forward)

What's Changed

New Contributors

Full Changelog: https://github.com/FlamedDogo99/EaglerMobile/commits/v2.4

Badges
Extracted from project README
Releases Eaglercraft.com License
Related Projects