diff options
Diffstat (limited to 'assets/js/gradings.js')
-rw-r--r-- | assets/js/gradings.js | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/assets/js/gradings.js b/assets/js/gradings.js index 92e696d..7db4c98 100644 --- a/assets/js/gradings.js +++ b/assets/js/gradings.js @@ -32,14 +32,6 @@ function hashCode(str) { // java String#hashCode return hash; } -function intToRGB(i) { - var c = (i & 0x00FFFFFF) - .toString(16) - .toUpperCase(); - - return "00000".substring(0, 6 - c.length) + c; -} - // http://www.w3.org/TR/AERT#color-contrast function getForegroundFromBackground(background_color) { let color_hex = background_color.replace("#", ""); @@ -56,11 +48,6 @@ function getForegroundFromBackground(background_color) { } } -function getHexColorFromString(str) { - return "#" + intToRGB(hashCode(str)); -} -// -------------------------------------------------- - function getDateString() { let date = new Date(); @@ -171,9 +158,12 @@ function setupPickers() { instances = M.Datepicker.init(elems, options); } +var urnikTheme = "privzeta"; - -document.addEventListener("DOMContentLoaded", () => { +document.addEventListener("DOMContentLoaded", async function () { + urnikTheme = await localforage.getItem("urnikTheme"); + if (urnikTheme == null || urnikTheme == undefined || urnikTheme == false) + urnikTheme = "privzeta"; checkLogin(); // Calendar setup var calendarEl = document.getElementById("calendar"); |