summaryrefslogtreecommitdiffstats
path: root/dist/js
diff options
context:
space:
mode:
authorrstular <rok@stular.eu>2020-05-17 19:38:43 +0200
committerrstular <rok@stular.eu>2020-05-17 19:38:43 +0200
commit61f0a67abdd293a17232bd5784b08709a3cd7856 (patch)
treef490a063655a85bc42eef58abf6d99581183174a /dist/js
parentMerge (diff)
downloadbeziapp-61f0a67abdd293a17232bd5784b08709a3cd7856.tar
beziapp-61f0a67abdd293a17232bd5784b08709a3cd7856.tar.gz
beziapp-61f0a67abdd293a17232bd5784b08709a3cd7856.tar.bz2
beziapp-61f0a67abdd293a17232bd5784b08709a3cd7856.tar.lz
beziapp-61f0a67abdd293a17232bd5784b08709a3cd7856.tar.xz
beziapp-61f0a67abdd293a17232bd5784b08709a3cd7856.tar.zst
beziapp-61f0a67abdd293a17232bd5784b08709a3cd7856.zip
Diffstat (limited to 'dist/js')
-rw-r--r--dist/js/gsec.js2
-rw-r--r--dist/js/settings.js8
2 files changed, 4 insertions, 6 deletions
diff --git a/dist/js/gsec.js b/dist/js/gsec.js
index c961c23..1016e7c 100644
--- a/dist/js/gsec.js
+++ b/dist/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/dist/js/settings.js b/dist/js/settings.js
index f31bfaf..3cb4c9b 100644
--- a/dist/js/settings.js
+++ b/dist/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) => {