Skip to content
Easy configuration dialog builder for user scripts
Branch: master
Clone or download
odyniec Fix problems affecting Google Chrome
- Fix undeclared variable problem
- Get rid of Firefox-specific CSS rules
Latest commit 51456c3 Oct 19, 2013
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Add README and .gitignore files Jul 10, 2011 Add iframe as a display mode and make it the default Jul 16, 2011
monkeyconfig.js Fix problems affecting Google Chrome Oct 19, 2013


MonkeyConfig is a simple configuration library for user scripts. It allows for easy creation of configuration dialog windows and takes care of storing and retrieving the configuration parameters for the script.

Usage Example

Tell your user script to use MonkeyConfig by placing a @require directive in the metadata section:

// ==UserScript==
// @name           AwesomeScript
// @require

Then, call MonkeyConfig() to construct your configuration object:

var cfg = new MonkeyConfig({
    title: 'AwesomeScript Configuration',
    menuCommand: true,
    params: {
        font_size: {
            type: 'select',
            choices: [ 'Small', 'Medium', 'Large' ],
            default: 'Medium'
        auto_adjust: {
            type: 'checkbox',
            default: true

And that's pretty much it. MonkeyConfig builds a configuration dialog based on the passed data:

Example configuration dialog

It also adds a menu item in the User Script Commands menu to open the configuration dialog:

Menu item to open the configuration dialog

At any time in your script, you can retrieve the value of a configuration parameter with the get() method:

var auto_adjust = cfg.get('auto_adjust');

and set a new value using the set() method:

cfg.set('font_size', 'Small');
You can’t perform that action at this time.