MCPcopy
hub / github.com/CodeboxIDE/codebox / addTheme

Function addTheme

client/core/themes.js:47–60  ·  view source on GitHub ↗
(properties)

Source from the content-addressed store, hash-verified

45
46 // Define new themes
47 var addTheme = function(properties) {
48 if (!properties.id || themes[properties.id]) return false;
49 logger.log("add theme", properties.id, properties);
50 themes[properties.id] = _.defaults(properties, {
51 'styles': {},
52 'description': "",
53 'editor': {}
54 });
55 updateThemeSettings();
56
57 if (!currentTheme) {
58 changeTheme(properties.id);
59 }
60 };
61
62 // Change theme
63 var changeTheme = function(themeId) {

Callers 1

themes.jsFile · 0.85

Calls 2

updateThemeSettingsFunction · 0.85
changeThemeFunction · 0.85

Tested by

no test coverage detected