You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Holly McFarland 21815ac23c
update example gif
8 months ago no longer requires being positioned before other scripts in tampermonkey 8 months ago
blaseball-userscript-options.user.js add ability to collapse the options for each userscript 8 months ago
example.gif update example gif 8 months ago

Blaseball Userscript Options

Allows other userscripts to store options in the Blaseball profile settings menu. Currently only supports checkboxes.

Requires Tampermonkey (chrome, firefox)

Install here

For developers:

To register options for your script, call the function document._BLASEBALL_USERSCRIPT_OPTIONS_REGISTER(namespace, option, defaultValue, type).

namespace: The name of your script. It should be exactly identical in every method that requires it.
option: The name of the option being registered.
defaultValue: What the value should be set to the first time the script is run. This is ignored if there's already a saved value.
type: The type of input method the option uses. Currently, only "checkbox", "number" and "text" are supported.

To get the value of an option, call document._BLASEBALL_USERSCRIPT_OPTIONS_GET(namespace, option). To set the value of an option, call document._BLASEBALL_USERSCRIPT_OPTIONS_SET(namespace, option, value), but you probably don't need to set options directly. They are automatically saved when the user changes their value in their profile settings.

For a simple example of how to register and use options, see Blaseball Team Game View.