no random themes for master (before merge)

This commit is contained in:
Felix Hamann 2018-06-09 18:17:32 +02:00
parent cd075f5990
commit ce5aaa2939

View File

@ -97,6 +97,7 @@ document.addEventListener('DOMContentLoaded', function() {
return acc;
},
[]);
selector.addEventListener('change', function(event) {
setTheme(event.target.value);
});
@ -105,15 +106,16 @@ document.addEventListener('DOMContentLoaded', function() {
document.body.className = 'theme--' + theme;
}
setInterval(function() {
setTheme(randomOption());
}, 20000);
// random theme on loading and again every 20 seconds
// setInterval(function() {
// setTheme(randomOption());
// }, 20000);
function randomOption() {
return options[Math.floor(Math.random() * options.length)];
}
// function randomOption() {
// return options[Math.floor(Math.random() * options.length)];
// }
// initial theme
setTheme(randomOption());
// // initial theme
// setTheme(randomOption());
});