This commit is contained in:
kek7198 2021-12-19 12:21:33 -06:00
parent 30a088fb5d
commit 06e5834e51
2 changed files with 17 additions and 2 deletions

View file

@ -145,4 +145,19 @@ function expandDesktopImage(image) {
document.getElementById("desktop-expanded-image").src = image.replace("200w_d.webp", "giphy.webp");
document.getElementById("desktop-expanded-image-link").href = image;
document.getElementById("desktop-expanded-image-wrap-link").href=image;
};
};
var previousTheme = [];
function changeTheme(theme) {
const body = document.body;
// if previous selection has a value, remove them from body tag
if (previousTheme.length) {
previousTheme.map(v => body.classList.toggle(v));
}
// toggle classes in body tag
theme.map(v => body.classList.toggle(v));
// Set global previous selection to current selection
previousTheme = theme;
}

View file

@ -347,7 +347,7 @@
{% if v %}
<script>function formkey() {return '{{v.formkey}}';}</script>
{% endif %}
<script src="/assets/CHRISTMAS/js/default.js?v=201"></script>
<script src="/assets/CHRISTMAS/js/default.js?v=202"></script>
</body>
</html>