Skip to content

Includes a modified game-min.js file which exposes functions present in headless host and other useful utilities

License

Notifications You must be signed in to change notification settings

ChasmSolacer/Haxball-Client-Expansion

Repository files navigation

Zobacz to w języku polskim

Haxball-Client-Expansion

Note: it will work only in Chromium Browser (Chrome, Edge, Brave, etc.)

(If you came here just to do simple things, such as changing avatar on keypress, go to point 3)

The game-min.js file is located on haxball.com/play.
In order to modify it, it needs to be overridden.

Instructions

1. Download repository

  • Click green Code button → Download ZIP.

Download ZIP

  • Extract the .zip file anywhere to an empty folder.
  • Do not rename the www.haxball.com folder or play file inside because they must be overridden!

2. Open Chromium Browser (Chrome, Edge, Brave, etc.)

Open Overrides tab

  • Click Select folder for overrides.

Select folder for overrides

  • Select the folder with extracted zip – should contain www.haxball.com folder.
  • Click Allow to give the browser access to folders.

Click Allow

  • This will override game-min.js file.
  • Now refresh the page. You should notice some changes (eg. folder_name=<random string> on top).
  • Everything should look like this – check if the directory structure on the right is the same as yours, the www.haxball.com folder is crucial: Overrides Working
  • When you close the browser, and you want to launch Haxball again, just go to Haxball, press F12 to open Dev Tools and refresh the page. The changes should apply. The overrides are preserved after browser restart, so you don't have to set them up again.
  • If you want to update, download this repo again (click green Code button → Download ZIP) and replace the old folder with the new one.

REMOVING OVERRIDES:
If you want to remove overrides, click the Ø button next to Enable Local Overrides option on the above image (if you don't see it, resize the panel).



3. Adding snippets (optional)

There are some example scripts in this repo such as: client_bot_utils.js or flashscore_logger.js.
They don't actually need overrides and work when client is not modded, although some triggers will be disabled. These files' contents can be just copy-pasted in the console and they'll work.
Snippets allow to save some js files in the browser and run them with one click.

  • Press F12 to open the DevTools panel.
  • Open the Sources tab.
  • Open the Snippets tab.

Open Snippets tab

  • Click New snippet

Click New snippet

  • New snippet file will appear.
  • Paste some code you want to run and click the triangle button below (or press Ctrl+Enter) to run the snippet.

Paste code and run

  • Snippets are preserved just like the overrides, so you will always have quick access to them.

NOTE: something (if not everything) could break after a Haxball update.

About

Includes a modified game-min.js file which exposes functions present in headless host and other useful utilities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages