Code Injector - Bonk.io

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

Versione datata 21/10/2021. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
Excigma
Valutazione
0 0 0
Versione
1.0.1
Creato il
13/10/2021
Aggiornato il
21/10/2021
Dimensione
3,63 KB
Licenza
Non disponibile
Applica a

Code Injector - Bonk.io

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

⚠️ Stability of this has not been thoroughly tested. Use extra caution if you are map making (take extra backups)

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

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

List of scripts that work with this:


If you are making your own injector:

  • Make sure @run-at is document-start, so it runs before this script

You can port current browser extensions such as kklkkj's kklee or Salama's bonk-vtol to work with this.

Installing kklee or bonk-vtol as a userscript:

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

⚠️ Use extra caution if you are map making (take extra backups)

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

If kklkkj or Salama makes "official" userscripts, you should use them instead

Creating a kklee userscript:

- ⚠️ I have not tested the stability of using kklee in a userscript thoroughly (Bonk might crash)
- ⚠️ I have not tested if everything works (Please double-check features such as automatic backups work before using this)
- ⚠️ Please install the official version (if and when it exists)
  • 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  A 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 another script as well, and it should work

⚠️ Use extra caution if you are map making (take extra backups)

You will need to repeat this for every update to kklee

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  A 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 another script as well, and it should work

⚠️ Use extra caution if you are map making (take extra backups)

You will need to repeat this for every update to bonk-vtol