diff options
author | portix <none@none> | 2012-08-15 16:14:24 +0200 |
---|---|---|
committer | portix <none@none> | 2012-08-15 16:14:24 +0200 |
commit | 047d88ebbd18f503f9382e9cf211c49e239e3408 (patch) | |
tree | 3d5f997b109ea5b5d3818b2f3b57c3121b5cad85 /scripts | |
parent | 581a63b1841b3e337d8d7cd867572a02fee9689f (diff) | |
download | dwb-047d88ebbd18f503f9382e9cf211c49e239e3408.zip |
New method extensions.toggle
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/extensions.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/lib/extensions.js b/scripts/lib/extensions.js index b6b6beb2..499d3332 100644 --- a/scripts/lib/extensions.js +++ b/scripts/lib/extensions.js @@ -172,6 +172,18 @@ _unload(arguments[0], false); return extensions.load.apply(this, arguments); } + }, + "toggle" : { + value : function(name, c) { + if (_registered[name] !== undefined) { + _unload(name); + return false; + } + else { + extensions.load(name, c); + return true; + } + } } }); })(); |