summaryrefslogtreecommitdiff
path: root/scripts/lib/extensions.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/extensions.js')
-rw-r--r--scripts/lib/extensions.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/lib/extensions.js b/scripts/lib/extensions.js
index 499d3332..1fb8b496 100644
--- a/scripts/lib/extensions.js
+++ b/scripts/lib/extensions.js
@@ -184,6 +184,20 @@
return true;
}
}
+ },
+ "bind" : {
+ value : function(name, shortcut, options) {
+ if (!name || !shortcut)
+ return;
+ if (options.load === undefined || options.load)
+ extensions.load(name, options.config);
+ bind(shortcut, function () {
+ if (extensions.toggle(name, options.config))
+ io.notify("Extension " + name + " enabled");
+ else
+ io.notify("Extension " + name + " disabled");
+ }, options.command);
+ }
}
});
})();