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
大小
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 (read bottom).

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

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

⚠️ 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 by them, you should use them instead

Creating a kklee userscript:

- ⚠️ I have not tested the stability of using kklee in an userscript thoroughly
- ⚠️ I have not tested if everything works
- ⚠️ Please double-check features such as automatic backups work before using this
  • 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

⚠️ 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  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

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

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址