From 61f0a67abdd293a17232bd5784b08709a3cd7856 Mon Sep 17 00:00:00 2001 From: rstular Date: Sun, 17 May 2020 19:38:43 +0200 Subject: Bug fixes (settings, gsec) --- assets/js/gsec.js | 2 +- assets/js/settings.js | 8 +++----- assets/pages-src/settings.bvr | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-) (limited to 'assets') diff --git a/assets/js/gsec.js b/assets/js/gsec.js index c961c23..1016e7c 100644 --- a/assets/js/gsec.js +++ b/assets/js/gsec.js @@ -250,7 +250,7 @@ class gsec { fetchGradings() { const DESC_REGEX = /\((.+?)\)/; - const SUBJECT_REGEX = /^(.+?) \(/; + const SUBJECT_REGEX = /^(.+?) \(/m; return new Promise((resolve) => { var gradings = []; diff --git a/assets/js/settings.js b/assets/js/settings.js index f31bfaf..3cb4c9b 100644 --- a/assets/js/settings.js +++ b/assets/js/settings.js @@ -17,13 +17,11 @@ async function setTheme(targetTheme) { document.addEventListener("DOMContentLoaded", async () => { $("#select-language").on("change", () => { - let languageToSet = $(this).find(":selected").data("language"); - setLanguage(languageToSet); + setLanguage($(this).find(":selected").val()); }); - $("#select-theme").on("change", () => { - let themeToSet = $(this).find(":selected").data("theme"); - setTheme(themeToSet); + $("#select-theme").on("change", function() { + setTheme($(this).find(":selected").val()); }); localforage.getItem("chosenLang").then((value) => { diff --git a/assets/pages-src/settings.bvr b/assets/pages-src/settings.bvr index 2056184..358a0ce 100644 --- a/assets/pages-src/settings.bvr +++ b/assets/pages-src/settings.bvr @@ -59,8 +59,8 @@
translate
@@ -71,8 +71,8 @@
palette
-- cgit v1.2.3