Customise help link label/url

This commit is contained in:
Nick O'Leary
2015-04-13 11:35:52 +01:00
parent 6ff540ed08
commit b0de8abb63
3 changed files with 27 additions and 3 deletions

View File

@@ -119,13 +119,30 @@ RED.settings = (function () {
});
};
function theme(property,defaultValue) {
if (!RED.settings.editorTheme) {
return defaultValue;
}
var parts = property.split(".");
var v = RED.settings.editorTheme;
try {
for (var i=0;i<parts.length;i++) {
v = v[parts[i]];
}
return v;
} catch(err) {
return defaultValue;
}
}
return {
init: init,
load: load,
set: set,
get: get,
remove: remove
remove: remove,
theme: theme
}
})
();