keeweb/app/scripts/util/theme-changer.js

15 lines
336 B
JavaScript
Raw Normal View History

2015-10-31 07:18:24 +01:00
'use strict';
var ThemeChanger = {
setTheme: function(theme) {
_.forEach(document.body.classList, function(cls) {
if (/^th\-/.test(cls)) {
document.body.classList.remove(cls);
}
});
document.body.classList.add('th-' + theme);
}
};
module.exports = ThemeChanger;