Finally, the chatJS Plugin System v2.1.0 is out!
Wait, what? What is this weird thing?
The chatJS Plugin System is a framework for the quietly release chatJS system, that allows injecting JavaScript into the SmileBASIC Source Chat to add commands and features.
A lot has been made already, from a bot that says quotes when you PM a certain message (outofcon.txt bot, Trinitro21) to a command that lets you style text (/style, 12Me21), to a command for running JavaScript without refreshing (runJS, ShadowCX11)). But this requires pasting a lot of text into a small editor, and it can get very crowded after a while. Also, a lot of this requires workarounds just to do simple tasks. The solution: the chatJS Plugin Systen.
It's a convienence for both chat users and chatJS developers that makes both tasks much easier. It only requires putting a small script in your chatJS, and you have the power to load/unload plugins, see help for all commands, edit a global storage systen, and more!
Alright, you've got me convinced, how do I install it?
Just follow these steps!
- Go to http://sbs-chatjs.github.io/bootstrap.js.
- Copy everything in the file to your chatJS.
- Refresh your chat window or open a new one.
- Profit!
- /loadplugin [name] - Loads a plugin, making it load automatically every time you open chat.
- /unloadplugin [name] - Unloads a plugin from the current session, and stops loading the plugin automatically.
- /localhelp [category?/plugin?] - Shows the categories for the commands if no argument, or shows the commands for said category/plugin.
- /plugininfo [name] - Shows information for said plugin.
- /myplugins - Shows the currently loaded plugins.
- style - By 12Me21 Allows you to use special characters like ~ and ` to style text, making it bold, italic, etc. It's based on a script he created for the old system.
- ooc - By Trinitro21
A plugin implementation of the outofcon.txt bot that he had running before moving to the new system. The name originated from a quote by slackerSnail:
just use n3ds browser to watch **** smh >don't take this out of context
- runjs - Based off an old plugin by Trinitro21, based off an older script by ShadowCX11 (ShadowCX13), adapted to the new system by ShadowCX11 (ShadowCX13) This is an adaptation of the plugin Trinitro21 made for the old plugin system, that was itself based off a script I made. It lets you evaluate JS immediately by either typing into a prompt or passing the code as a parameter.
- webnotify - By ShadowCX11 (ShadowCX13) This is the "example" plugin. It uses most of the possible functions and APIs, including Global Storage and the events system. WebNotify shows a Web Notification when a message is recieved. You can make it only notify when your username or aliases added with /notifyalias is seen or when you're pinged (with @[username]. Ex: @ShadowCX13).