This commit is contained in:
Kyle
2020-07-24 17:32:37 -07:00
parent b40048d247
commit 5329616139
3 changed files with 10 additions and 6 deletions

View File

@@ -9,7 +9,9 @@ rootStyles.setProperty('--body-background', 'none')
setCookie('colorPalette', 'dayRave')
//Stops the hue shift when another palette is loaded
document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false)
if (document.getElementById('inputColorPalette') != null) {
document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false)
}
function removeEventListener() {
clearInterval(colorCycle)
@@ -17,7 +19,7 @@ function removeEventListener() {
}
//Shifts the hue
var colorCycle = setInterval(shiftHue, 100)
var colorCycle = setInterval(shiftHue, 200)
var currentHueRotation = 0
function shiftHue() {

View File

@@ -9,7 +9,9 @@ rootStyles.setProperty('--body-background', 'none')
setCookie('colorPalette', 'nightRave')
//Stops the hue shift when another palette is loaded
document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false)
if (document.getElementById('inputColorPalette') != null) {
document.getElementById('inputColorPalette').addEventListener('change', removeEventListener, false)
}
function removeEventListener() {
clearInterval(colorCycle)
@@ -17,7 +19,7 @@ function removeEventListener() {
}
//Shifts the hue
var colorCycle = setInterval(shiftHue, 100)
var colorCycle = setInterval(shiftHue, 200)
var currentHueRotation = 0
function shiftHue() {