fix
diff --git a/init.js b/init.js
index c558d71..19c241c 100644
--- a/init.js
+++ b/init.js
@@ -173,7 +173,15 @@
}
}
if (dtps.period && (String(localStorage.dtpsSchedule).startsWith("{"))) { dtps.currentClass = JSON.parse(localStorage.dtpsSchedule)[dtps.period]; }
-jQuery.getScript('https://dtps.js.org/fluid.js', () => fluid.init);
+jQuery.getScript('https://dtps.js.org/fluid.js', function() {
+ fluid.init();
+ fluid.onThemeChange = function() {
+ var next = window.getComputedStyle(document.getElementsByClassName("background")[0]).getPropertyValue("--grad")
+ if (dtps.selectedClass !== "dash") next = "linear-gradient(to bottom right, " + window.getComputedStyle(document.getElementsByClassName("background")[0]).getPropertyValue($("body").hasClass("midnight") ? "--dark" : "--light") + ", " + ($("body").hasClass("dark") ? "var(--flex-bg, #252525)" : "var(--flex-bg, white)") + ")"
+ if (dtps.selectedClass !== "dash") $('body').removeClass('dashboard');
+ $(".background").css("background", next);
+ }
+});
jQuery.getScript("https://www.googletagmanager.com/gtag/js?id=UA-105685403-3", function() {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
@@ -475,12 +483,6 @@
});
}
}
-dtps.onThemeChange = function() {
- var next = window.getComputedStyle(document.getElementsByClassName("background")[0]).getPropertyValue("--grad")
- if (dtps.selectedClass !== "dash") next = "linear-gradient(to bottom right, " + window.getComputedStyle(document.getElementsByClassName("background")[0]).getPropertyValue($("body").hasClass("midnight") ? "--dark" : "--light") + ", " + ($("body").hasClass("dark") ? "var(--flex-bg, #252525)" : "var(--flex-bg, white)") + ")"
- if (dtps.selectedClass !== "dash") $('body').removeClass('dashboard');
- $(".background").css("background", next)
-}
dtps.schedule = function() {
var schedule = {}
if (confirm("Type in which period you have each class as a number (1-6). If the class is from a different semester or you don't have that class for a class period, leave the box blank")) {