Code Injector - Bonk.io

Allows different userscripts to define functions that modify the game's code

2021-10-14 يوللانغان نەشرى. ئەڭ يېڭى نەشرىنى كۆرۈش.

ئاپتورى
Excigma
باھا نومۇرى
0 0 0
نەشرى
1.0.0
قۇرۇلغان ۋاقتى
2021-10-13
يېڭىلانغان ۋاقتى
2021-10-14
Size
3.6 KB
ئىجازەتنامىسى
يوق
قوللايدىغىنى

Code Injector - Bonk.io

Finds other userscripts that have defined their injectors in window.bonkCodeInjectors, and runs them

Currently, there are no userscripts that use this (yet) - but you can port current extensions such as kklkkj's kklee or Salama's bonk-vtol.

This script does not add any changes by itself, you need to install other scripts alongside this.

Credits to https://github.com/kklkkj for creating this system where multiple extensions can edit different parts of Bonk.io' code.

Much of the code below was copied from or inspired by https://github.com/kklkkj/kklee/blob/master/src/runInjectors.js

Go thank kklkkj for this userscript

Installing kklee or bonk-vtol as an userscript:

Please bear in mind that this is not the intended method of installing kklee nor bonk-vtol

Do not ask the original creators about problems with the method below

Creating a kklee userscript:

  • Download the latest kklee from https://github.com/kklkkj/kklee/releases
  • Unzip the zip file
  • Locate injector.js inside the unzipped folder
  • Create a new script in Tampermonkey or Violentmonkey
  • Replace the template with:
// ==UserScript==
// @name         kklee
// @version      0.0.1
// @author       kklkkj
// @description  An userscript that extends the functionality of the map editor in bonk.io.
// @match        https://bonk.io/gameframe-release.html
// @run-at       document-start
// @grant        none
// ==/UserScript==

  • Open injector.js with your preferred text editor and copy the entirety of the contents (Warning: may be laggy)
  • Paste the contents of injector.js at the end of the userscript template, so that there is a newline after // ==/UserScript==
  • Save the script you have just created
  • Make sure you have installed this script (Code Injector - Bonk.io) as well, and it should work

You will need to do this for every update again

Creating a bonk-vtol userscript:

  • Create a new script in Tampermonkey or Violentmonkey
  • Replace the template with:
// ==UserScript==
// @name         bonk-vtol
// @version      0.0.1
// @author       Salama
// @description  An userscript to add VTOL back to bonk.io
// @match        https://bonk.io/gameframe-release.html
// @run-at       document-start
// @grant        none
// ==/UserScript==

  • Go to https://github.com/Salama/bonk-vtol/blob/master/injector.js
  • Click the Raw button at the top right of the code
  • Copy the entirety of the contents on the page
  • Paste the contents at the end of the userscript template, so that there is a newline after // ==/UserScript==
  • Save the script you have just created
  • Make sure you have installed this script (Code Injector - Bonk.io) as well, and it should work

You will need to do this for every update again