Code Injector - Bonk.io

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

当前为 2021-10-19 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
Excigma
评分
0 0 0
版本
1.0.1
创建于
2021-10-13
更新于
2021-10-19
大小
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 of this 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 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