Skip to content

1.6.0: The Userscript Update

Compare
Choose a tag to compare
@KraXen72 KraXen72 released this 29 Jun 17:38
· 159 commits to master since this release

1.6.0 The Userscript Update (2022-06-29)

This release is mainly about userscripts. The new hot, new stuff includes:

  • Internal Userscript logic has been re-written (Userscripts are now a class)
  • Userscripts can now provide metadata (name, author, desc, version, source...) and it will be displayed in the client
  • Userscripts which are disabled will inject into the page as soon as you turn them on
  • Userscripts can define an unload function, and if they do so, you can turn them on/off without reloading the page
  • Userscripts can now log into console even though krunker disables it by default.
  • New documentation explaining how to write a userscript for crankshaft

I really advise all userscript devs to take a look at the new Documentation for writing userscripts - your old userscripts should still work, but a lot of stuff has changed, so it would be good to update them.

I also tried to fix the memory leak that was reported by 1 user, by letting electron gracefully shut down when all windows are closed. If this still occurs, please let me know in the discord (link in readme or in Issues.

Features

  • disabled button css (ff195ef)
  • implement userscript @run-at (79d3d40)
  • load userscripts when enabled, unload support (2e3aefc)
  • parse new userscript metadata (e7c1689)
  • proper userscript metadata docs (838336c)
  • userscript can provide metadata (14f5412)
  • Userscript class rewrite (592abac)
  • Userscript rewrite part 2 (dbd5b58)
  • userscripts can log to console (11c6e55)

Bug Fixes

  • formatting 2: electric bogaloo (6c3c1c6)
  • Formatting in userscripts.ts (6b63068)
  • remove once: true for domcontentloaded (cabaff1)

Full Changelog: 1.5.7...1.6.0