summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-08-12 23:10:50 +0200
committerportix <portix@gmx.net>2012-08-12 23:10:50 +0200
commit7dfbdb7f82bf2d19abd4dca9e64c4a8db9e1aebb (patch)
tree6df50261b8fd7914484b452cc9da7c3f2d2197f7 /scripts
parent56a2f8370746866d34f854e47081e50c29a9b327 (diff)
downloaddwb-7dfbdb7f82bf2d19abd4dca9e64c4a8db9e1aebb.zip
Implementing extensions.getConfig
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/extensions.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/lib/extensions.js b/scripts/lib/extensions.js
index 3f5a7fc0..b6b6beb2 100644
--- a/scripts/lib/extensions.js
+++ b/scripts/lib/extensions.js
@@ -83,6 +83,19 @@
io.print("\033[1mDWB EXTENSION: \033[0mextension \033[1m" + name + "\033[0m: " + message, "stderr");
}
},
+ "getConfig" : {
+ value : function(c, dc) {
+ var k, config = {};
+ if (c === null || c === undefined)
+ config = dc;
+ else {
+ for (k in dc) {
+ config[k] = typeof c[k] === typeof dc[k] ? c[k] : dc[k];
+ }
+ }
+ return config;
+ }
+ },
"load" : {
value : function(name, c) {
if (_registered[name] !== undefined) {