47 lines
967 B
JavaScript
47 lines
967 B
JavaScript
function swapSheet (name) {
|
|
document.querySelector('#theme_stylesheet').setAttribute('href', 'style/' + name + '.css')
|
|
}
|
|
|
|
window.themes = module.exports = {
|
|
available: {
|
|
default: {
|
|
name: 'Default',
|
|
type: 'bright',
|
|
nick_pallete: {
|
|
H: [1, 360],
|
|
S: [30, 100],
|
|
L: [30, 70]
|
|
},
|
|
stylesheet: 'theme_default',
|
|
default: true,
|
|
colorSamples: {
|
|
toolbar: '#00c7e0',
|
|
background: '#f5f5f5'
|
|
}
|
|
},
|
|
|
|
night: {
|
|
name: 'Night',
|
|
type: 'dark',
|
|
nick_pallete: {
|
|
H: [1, 360],
|
|
S: [30, 100],
|
|
L: [50, 100]
|
|
},
|
|
stylesheet: 'theme_night',
|
|
default: false,
|
|
colorSamples: {
|
|
toolbar: '#008e8e',
|
|
background: '#1d1d1d'
|
|
}
|
|
}
|
|
},
|
|
|
|
changeTheme: function (name) {
|
|
if (name in window.themes.available) {
|
|
swapSheet(window.themes.available[name].stylesheet)
|
|
window.irc.config.theme = name
|
|
}
|
|
}
|
|
}
|