no random themes for master (before merge)
This commit is contained in:
parent
cd075f5990
commit
ce5aaa2939
@ -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());
|
||||
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user