diff --git a/src/modules/ui.css b/src/modules/ui.css
index 756081d..2fdb8fb 100644
--- a/src/modules/ui.css
+++ b/src/modules/ui.css
@@ -131,7 +131,8 @@ div[data-modal-actions] > button {
dialog > button[data-modal-view]:not(.icon),
dialog > button[data-logout],
dialog > button[data-sync],
-dialog > button[data-welcome] {
+dialog > button[data-welcome],
+dialog > button[data-report-bug] {
text-align: unset;
}
diff --git a/src/modules/ui.js b/src/modules/ui.js
index eef3368..ac505e4 100644
--- a/src/modules/ui.js
+++ b/src/modules/ui.js
@@ -1029,4 +1029,71 @@ export async function setNotifications(array) {
document.querySelector('[data-modal-view="history"]')?.classList.remove('unread');
document.querySelector('[data-modal-view="history"]')?.setAttribute('tooltip', 'History');
}
-}
\ No newline at end of file
+}
+
+document.querySelectorAll('[data-report-bug]').forEach(a => a.addEventListener('click', reportBugModal));
+
+export function reportBugModal(event = null, report = null) {
+ if (report) toast('A bug was detected, please report it.', 10000, 'error', 'bi bi-bug-fill');
+ view();
+ modal({
+ title: 'Report Bug',
+ body: '
Report a bug with the Virtual Checker or internal APIs.
',
+ inputs: [
+ {
+ type: 'select',
+ label: 'Issue with',
+ options: [
+ { value: 'Virtual Checker', text: 'Virtual Checker' },
+ { value: 'Homework Checker (API)', text: 'API' },
+ ],
+ required: true,
+ disabled: report,
+ },
+ {
+ type: 'textarea',
+ label: 'Description',
+ placeholder: 'Describe the issue you encountered...',
+ required: true,
+ selectAll: !report,
+ disabled: report,
+ defaultValue: report || '',
+ }
+ ],
+ buttons: [
+ {
+ text: 'Cancel',
+ icon: 'bi-x-lg',
+ class: 'cancel-button',
+ close: true,
+ },
+ {
+ text: 'Submit',
+ icon: 'bi-bug-fill',
+ class: 'submit-button',
+ onclick: (inputValues) => {
+ try {
+ const fields = {
+ "entry.470737118": storage.get("code"),
+ "entry.888169052": inputValues[0],
+ "entry.689497704": `${report ? '000' : storage.get("code")}:${inputValues[1]}`,
+ };
+ const params = new URLSearchParams(fields).toString();
+ const url = "https://docs.google.com/forms/d/e/1FAIpQLSdOO9-Y7IG-djY1MVFpr1qR5-vXw6asU--e61w9atFaRVOpNw/formResponse?";
+ fetch(url + params, {
+ method: "POST",
+ mode: "no-cors",
+ headers: {
+ "Content-Type": "application/x-www-form-urlencoded",
+ },
+ });
+ toast('Bug report submitted successfully. Thank you!', 5000, 'success', 'bi bi-check-circle-fill');
+ } catch (e) {
+ toast('Failed to submit bug report. Please try again later.', 5000, 'error', 'bi bi-x-circle-fill');
+ }
+ },
+ close: true,
+ },
+ ],
+ });
+}
From db94f135bdb3f0cdafa5a297731fa356cebe6870 Mon Sep 17 00:00:00 2001
From: Faisal N
Date: Sat, 3 Jan 2026 23:57:45 -0500
Subject: [PATCH 04/11] Automatic bug reports Fixes #468
---
src/admin.js | 4 +++-
src/checker/admin.js | 2 ++
src/checker/checker.js | 4 +++-
src/checker/ta.js | 2 ++
src/keybinds/keybinds.js | 4 +++-
src/main.js | 4 +++-
src/modules/mathlive.js | 13 ++++++++-----
src/ta.js | 4 +++-
src/themes/butterfly/butterfly.js | 5 ++++-
src/themes/themes.js | 9 ++++++---
10 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/src/admin.js b/src/admin.js
index 935372c..4a71918 100644
--- a/src/admin.js
+++ b/src/admin.js
@@ -131,6 +131,8 @@ try {
} catch (error) {
if (storage.get("developer")) {
alert(`Error @ admin.js: ${error.message}`);
- };
+ } else {
+ ui.reportBugModal(null, String(error.stack));
+ }
throw error;
};
\ No newline at end of file
diff --git a/src/checker/admin.js b/src/checker/admin.js
index 4232f5f..b99193b 100644
--- a/src/checker/admin.js
+++ b/src/checker/admin.js
@@ -6361,6 +6361,8 @@ try {
} catch (error) {
if (storage.get("developer")) {
alert(`Error @ admin.js: ${error.message}`);
+ } else {
+ ui.reportBugModal(null, String(error.stack));
}
throw error;
}
\ No newline at end of file
diff --git a/src/checker/checker.js b/src/checker/checker.js
index 7950025..3f7b0e3 100644
--- a/src/checker/checker.js
+++ b/src/checker/checker.js
@@ -1521,6 +1521,8 @@ try {
} catch (error) {
if (storage.get("developer")) {
alert(`Error @ clicker.js: ${error.message}`);
- };
+ } else {
+ ui.reportBugModal(null, String(error.stack));
+ }
throw error;
};
\ No newline at end of file
diff --git a/src/checker/ta.js b/src/checker/ta.js
index 4b6ae1e..107b9be 100644
--- a/src/checker/ta.js
+++ b/src/checker/ta.js
@@ -1298,6 +1298,8 @@ try {
} catch (error) {
if (storage.get("developer")) {
alert(`Error @ ta.js: ${error.message}`);
+ } else {
+ ui.reportBugModal(null, String(error.stack));
}
throw error;
}
\ No newline at end of file
diff --git a/src/keybinds/keybinds.js b/src/keybinds/keybinds.js
index 44e5844..6b21813 100644
--- a/src/keybinds/keybinds.js
+++ b/src/keybinds/keybinds.js
@@ -129,6 +129,8 @@ try {
} catch (error) {
if (storage.get("developer")) {
alert(`Error @ keybinds.js: ${error.message}`);
- };
+ } else {
+ ui.reportBugModal(null, String(error.stack));
+ }
throw error;
};
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 7c1b45d..685bb49 100644
--- a/src/main.js
+++ b/src/main.js
@@ -128,6 +128,8 @@ try {
} catch (error) {
if (storage.get("developer")) {
alert(`Error @ main.js: ${error.message}`);
- };
+ } else {
+ ui.reportBugModal(null, String(error.stack));
+ }
throw error;
};
\ No newline at end of file
diff --git a/src/modules/mathlive.js b/src/modules/mathlive.js
index 95436ea..a51befa 100644
--- a/src/modules/mathlive.js
+++ b/src/modules/mathlive.js
@@ -1,12 +1,15 @@
+import * as ui from "/src/modules/ui.js";
import storage from "/src/modules/storage.js";
import "/node_modules/mathlive/dist/mathlive-fonts.css";
import { MathfieldElement } from "mathlive";
try {
- MathfieldElement.soundsDirectory = null;
+ MathfieldElement.soundsDirectory = null;
} catch (error) {
- if (storage.get("developer")) {
- alert(`Error @ mathlive.js: ${error.message}`);
- };
- throw error;
+ if (storage.get("developer")) {
+ alert(`Error @ mathlive.js: ${error.message}`);
+ } else {
+ ui.reportBugModal(null, String(error.stack));
+ }
+ throw error;
};
\ No newline at end of file
diff --git a/src/ta.js b/src/ta.js
index 567e94d..9aa8ccc 100644
--- a/src/ta.js
+++ b/src/ta.js
@@ -127,6 +127,8 @@ try {
} catch (error) {
if (storage.get("developer")) {
alert(`Error @ ta.js: ${error.message}`);
- };
+ } else {
+ ui.reportBugModal(null, String(error.stack));
+ }
throw error;
};
\ No newline at end of file
diff --git a/src/themes/butterfly/butterfly.js b/src/themes/butterfly/butterfly.js
index d7123b3..55a44f2 100644
--- a/src/themes/butterfly/butterfly.js
+++ b/src/themes/butterfly/butterfly.js
@@ -1,3 +1,4 @@
+import * as ui from "/src/modules/ui.js";
import storage from "/src/modules/storage.js";
import "./butterfly.css";
import star0 from "./stars/star0.png";
@@ -43,6 +44,8 @@ try {
} catch (error) {
if (storage.get("developer")) {
alert(`Error @ butterfly.js: ${error.message}`);
- };
+ } else {
+ ui.reportBugModal(null, String(error.stack));
+ }
throw error;
};
\ No newline at end of file
diff --git a/src/themes/themes.js b/src/themes/themes.js
index f12bcc8..c1a1155 100644
--- a/src/themes/themes.js
+++ b/src/themes/themes.js
@@ -5,6 +5,7 @@ import themes from "./themes.json";
import "./butterfly/butterfly.js";
import "./festive/festive.js";
+import * as ui from "/src/modules/ui.js";
import storage from "/src/modules/storage.js";
import * as auth from "/src/modules/auth.js";
import Element from "/src/modules/element.js";
@@ -122,8 +123,8 @@ function updateThemeCode() {
function sortKeys(obj) {
return Object.keys(obj).sort().reduce((acc, key) => {
- acc[key] = obj[key];
- return acc;
+ acc[key] = obj[key];
+ return acc;
}, {});
}
@@ -333,6 +334,8 @@ try {
} catch (error) {
if (storage.get("developer")) {
alert(`Error @ themes.js: ${error.message}`);
- };
+ } else {
+ ui.reportBugModal(null, String(error.stack));
+ }
throw error;
};
\ No newline at end of file
From 351dba64333c0242ccfe2804b1ca85b90cbb179e Mon Sep 17 00:00:00 2001
From: Faisal N
Date: Sun, 4 Jan 2026 00:00:31 -0500
Subject: [PATCH 05/11] Allow admins and TAs to submit bug reports
---
admin/archive.html | 1 +
admin/backups.html | 1 +
admin/courses.html | 1 +
admin/editor.html | 1 +
admin/index.html | 1 +
admin/logs.html | 1 +
admin/passwords.html | 1 +
admin/questions.html | 1 +
admin/reports.html | 1 +
admin/responses.html | 1 +
admin/users.html | 1 +
ta/index.html | 1 +
ta/questions.html | 1 +
13 files changed, 13 insertions(+)
diff --git a/admin/archive.html b/admin/archive.html
index dc306fb..79339b6 100644
--- a/admin/archive.html
+++ b/admin/archive.html
@@ -205,6 +205,7 @@
+
diff --git a/admin/backups.html b/admin/backups.html
index 107cbdc..5e496fe 100644
--- a/admin/backups.html
+++ b/admin/backups.html
@@ -124,6 +124,7 @@
+
diff --git a/admin/courses.html b/admin/courses.html
index f90df41..8ad0924 100644
--- a/admin/courses.html
+++ b/admin/courses.html
@@ -123,6 +123,7 @@
+
diff --git a/admin/editor.html b/admin/editor.html
index fa59019..09ea3c6 100644
--- a/admin/editor.html
+++ b/admin/editor.html
@@ -193,6 +193,7 @@
+
diff --git a/admin/index.html b/admin/index.html
index 5fbddec..7365d80 100644
--- a/admin/index.html
+++ b/admin/index.html
@@ -279,6 +279,7 @@
+
diff --git a/admin/logs.html b/admin/logs.html
index f5f036c..fb58770 100644
--- a/admin/logs.html
+++ b/admin/logs.html
@@ -177,6 +177,7 @@
+
diff --git a/admin/passwords.html b/admin/passwords.html
index cd8a7bd..8697140 100644
--- a/admin/passwords.html
+++ b/admin/passwords.html
@@ -125,6 +125,7 @@
+
diff --git a/admin/questions.html b/admin/questions.html
index fbf2841..df79394 100644
--- a/admin/questions.html
+++ b/admin/questions.html
@@ -201,6 +201,7 @@
+
diff --git a/admin/reports.html b/admin/reports.html
index 0c48310..6079064 100644
--- a/admin/reports.html
+++ b/admin/reports.html
@@ -204,6 +204,7 @@
+
diff --git a/admin/responses.html b/admin/responses.html
index 23ee268..4948e45 100644
--- a/admin/responses.html
+++ b/admin/responses.html
@@ -286,6 +286,7 @@
+
diff --git a/admin/users.html b/admin/users.html
index ca0ce5b..b79fa10 100644
--- a/admin/users.html
+++ b/admin/users.html
@@ -122,6 +122,7 @@
+
diff --git a/ta/index.html b/ta/index.html
index 42a1bde..bdb949b 100644
--- a/ta/index.html
+++ b/ta/index.html
@@ -265,6 +265,7 @@
+
diff --git a/ta/questions.html b/ta/questions.html
index 2533497..a31f208 100644
--- a/ta/questions.html
+++ b/ta/questions.html
@@ -198,6 +198,7 @@
+
From 9147e936d657db5ec9c98e27df776407bf335d22 Mon Sep 17 00:00:00 2001
From: Faisal N
Date: Sun, 4 Jan 2026 00:07:26 -0500
Subject: [PATCH 06/11] Ctrl+B keybind launches report bug modal Fixes #467
---
admin/archive.html | 1 +
admin/backups.html | 1 +
admin/courses.html | 1 +
admin/editor.html | 1 +
admin/index.html | 1 +
admin/logs.html | 1 +
admin/passwords.html | 1 +
admin/questions.html | 1 +
admin/reports.html | 1 +
admin/responses.html | 1 +
admin/users.html | 1 +
index.html | 1 +
src/keybinds/keybinds.js | 1 +
ta/index.html | 1 +
ta/questions.html | 1 +
15 files changed, 15 insertions(+)
diff --git a/admin/archive.html b/admin/archive.html
index 79339b6..482ca52 100644
--- a/admin/archive.html
+++ b/admin/archive.html
@@ -318,6 +318,7 @@ 000
y Mark response correct
n Mark response incorrect
q Open response question
+ Ctrl + b Open Report Bug
diff --git a/admin/backups.html b/admin/backups.html
index 5e496fe..89968bf 100644
--- a/admin/backups.html
+++ b/admin/backups.html
@@ -237,6 +237,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/admin/courses.html b/admin/courses.html
index 8ad0924..ed788a3 100644
--- a/admin/courses.html
+++ b/admin/courses.html
@@ -236,6 +236,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/admin/editor.html b/admin/editor.html
index 09ea3c6..c151b09 100644
--- a/admin/editor.html
+++ b/admin/editor.html
@@ -306,6 +306,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/admin/index.html b/admin/index.html
index 7365d80..cd02979 100644
--- a/admin/index.html
+++ b/admin/index.html
@@ -392,6 +392,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/admin/logs.html b/admin/logs.html
index fb58770..868b53e 100644
--- a/admin/logs.html
+++ b/admin/logs.html
@@ -290,6 +290,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/admin/passwords.html b/admin/passwords.html
index 8697140..dea02ae 100644
--- a/admin/passwords.html
+++ b/admin/passwords.html
@@ -238,6 +238,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/admin/questions.html b/admin/questions.html
index df79394..fc188d5 100644
--- a/admin/questions.html
+++ b/admin/questions.html
@@ -314,6 +314,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/admin/reports.html b/admin/reports.html
index 6079064..50ce3ea 100644
--- a/admin/reports.html
+++ b/admin/reports.html
@@ -317,6 +317,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/admin/responses.html b/admin/responses.html
index 4948e45..b599b96 100644
--- a/admin/responses.html
+++ b/admin/responses.html
@@ -399,6 +399,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/admin/users.html b/admin/users.html
index b79fa10..3a10c58 100644
--- a/admin/users.html
+++ b/admin/users.html
@@ -235,6 +235,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/index.html b/index.html
index 2f3ae68..89fce0d 100644
--- a/index.html
+++ b/index.html
@@ -428,6 +428,7 @@
000
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + i Launch Welcome Intro
+
Ctrl + b Open Report Bug
diff --git a/src/keybinds/keybinds.js b/src/keybinds/keybinds.js
index 6b21813..c08212a 100644
--- a/src/keybinds/keybinds.js
+++ b/src/keybinds/keybinds.js
@@ -35,6 +35,7 @@ try {
e.preventDefault();
document.querySelector('[data-next-question]').click();
}
+ if (e.key == "b") ui.reportBugModal();
} else if (e.altKey) {
if (/[1-9]/.test(e.key)) {
e.preventDefault();
diff --git a/ta/index.html b/ta/index.html
index bdb949b..04ca0bb 100644
--- a/ta/index.html
+++ b/ta/index.html
@@ -377,6 +377,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
diff --git a/ta/questions.html b/ta/questions.html
index a31f208..b3f0c7d 100644
--- a/ta/questions.html
+++ b/ta/questions.html
@@ -310,6 +310,7 @@
000
y Mark response correct
n Mark response incorrect
q Open response question
+
Ctrl + b Open Report Bug
From c138a22f29099f9b5c144e222ce61f5ae32c3055 Mon Sep 17 00:00:00 2001
From: Faisal N
Date: Sun, 4 Jan 2026 00:18:35 -0500
Subject: [PATCH 07/11] Bug fixes
---
admin/archive.html | 2 --
admin/backups.html | 2 --
admin/courses.html | 2 --
admin/editor.html | 2 --
admin/index.html | 2 --
admin/logs.html | 2 --
admin/passwords.html | 2 --
admin/questions.html | 2 --
admin/reports.html | 2 --
admin/responses.html | 2 --
admin/users.html | 2 --
index.html | 2 +-
src/modules/mathlive.js | 13 +------------
src/symbols/symbols.js | 10 +++++++---
ta/index.html | 2 --
ta/questions.html | 2 --
16 files changed, 9 insertions(+), 42 deletions(-)
diff --git a/admin/archive.html b/admin/archive.html
index 482ca52..8a7125e 100644
--- a/admin/archive.html
+++ b/admin/archive.html
@@ -302,11 +302,9 @@ 000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/admin/backups.html b/admin/backups.html
index 89968bf..4c8ace0 100644
--- a/admin/backups.html
+++ b/admin/backups.html
@@ -221,11 +221,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/admin/courses.html b/admin/courses.html
index ed788a3..622e471 100644
--- a/admin/courses.html
+++ b/admin/courses.html
@@ -220,11 +220,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/admin/editor.html b/admin/editor.html
index c151b09..f357fe7 100644
--- a/admin/editor.html
+++ b/admin/editor.html
@@ -290,11 +290,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/admin/index.html b/admin/index.html
index cd02979..4d5624c 100644
--- a/admin/index.html
+++ b/admin/index.html
@@ -376,11 +376,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/admin/logs.html b/admin/logs.html
index 868b53e..8cad76f 100644
--- a/admin/logs.html
+++ b/admin/logs.html
@@ -274,11 +274,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/admin/passwords.html b/admin/passwords.html
index dea02ae..54cc01a 100644
--- a/admin/passwords.html
+++ b/admin/passwords.html
@@ -222,11 +222,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/admin/questions.html b/admin/questions.html
index fc188d5..7d59bb3 100644
--- a/admin/questions.html
+++ b/admin/questions.html
@@ -298,11 +298,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/admin/reports.html b/admin/reports.html
index 50ce3ea..19aa170 100644
--- a/admin/reports.html
+++ b/admin/reports.html
@@ -301,11 +301,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/admin/responses.html b/admin/responses.html
index b599b96..277d02d 100644
--- a/admin/responses.html
+++ b/admin/responses.html
@@ -383,11 +383,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/admin/users.html b/admin/users.html
index 3a10c58..04b4d58 100644
--- a/admin/users.html
+++ b/admin/users.html
@@ -219,11 +219,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
Ctrl + S Launch Speed Mode
[ Hide Island
diff --git a/index.html b/index.html
index 89fce0d..28a57ad 100644
--- a/index.html
+++ b/index.html
@@ -419,7 +419,7 @@
000
-
Ctrl + Enter Submit click
+
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + ← Previous question
Ctrl + → Next question
diff --git a/src/modules/mathlive.js b/src/modules/mathlive.js
index a51befa..a212054 100644
--- a/src/modules/mathlive.js
+++ b/src/modules/mathlive.js
@@ -1,15 +1,4 @@
-import * as ui from "/src/modules/ui.js";
-import storage from "/src/modules/storage.js";
import "/node_modules/mathlive/dist/mathlive-fonts.css";
import { MathfieldElement } from "mathlive";
-try {
- MathfieldElement.soundsDirectory = null;
-} catch (error) {
- if (storage.get("developer")) {
- alert(`Error @ mathlive.js: ${error.message}`);
- } else {
- ui.reportBugModal(null, String(error.stack));
- }
- throw error;
-};
\ No newline at end of file
+MathfieldElement.soundsDirectory = null;
\ No newline at end of file
diff --git a/src/symbols/symbols.js b/src/symbols/symbols.js
index 9d7c008..43bf9a5 100644
--- a/src/symbols/symbols.js
+++ b/src/symbols/symbols.js
@@ -160,11 +160,15 @@ function insert(symbol, customInput) {
if (customInput) {
customInput.setRangeText(symbol, customInput.selectionStart, customInput.selectionEnd, "end");
customInput.focus();
- } else {
+ } else if (answerInput) {
answerInput.setRangeText(symbol, answerInput.selectionStart, answerInput.selectionEnd, "end");
answerInput.focus();
- };
- autocomplete.update();
+ } else if (document.activeElement && (document.activeElement.tagName.toLowerCase() === 'input' && document.activeElement.getAttribute("type") && (document.activeElement.getAttribute("type") === "text") || document.activeElement.tagName.toLowerCase() === 'textarea')) {
+ const activeInput = document.activeElement;
+ activeInput.setRangeText(symbol, activeInput.selectionStart, activeInput.selectionEnd, "end");
+ activeInput.focus();
+ }
+ autocomplete?.update();
}
// Insert symbol from index
diff --git a/ta/index.html b/ta/index.html
index 04ca0bb..249719a 100644
--- a/ta/index.html
+++ b/ta/index.html
@@ -362,11 +362,9 @@
000
-
Ctrl + Enter Submit check
Alt + 1-9 Insert nth symbol
Ctrl + / Open Keyboard Shortcuts
Ctrl + , Open Settings
-
Ctrl + . Open History
Shift + R Reset theme and cache
[ Hide Island
] Show Island
diff --git a/ta/questions.html b/ta/questions.html
index b3f0c7d..58b8660 100644
--- a/ta/questions.html
+++ b/ta/questions.html
@@ -295,11 +295,9 @@
000