aboutsummaryrefslogtreecommitdiff
path: root/utils-prod.js
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2026-05-29 14:52:00 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2026-05-29 14:52:00 +0200
commitaa060c946d914affc7981f0d76a7edeb27e1cfe1 (patch)
treeeb842d82c8a3d36c66e538ce879f326aec3e93c9 /utils-prod.js
parent983a2303fc0617b9fcb94a2f814fc90693977b5e (diff)
downloadbycs-sol-aa060c946d914affc7981f0d76a7edeb27e1cfe1.tar.gz
bycs-sol-aa060c946d914affc7981f0d76a7edeb27e1cfe1.zip
fix isTeacher detection and use common utils
Diffstat (limited to 'utils-prod.js')
-rw-r--r--utils-prod.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils-prod.js b/utils-prod.js
new file mode 100644
index 0000000..1dd7e8e
--- /dev/null
+++ b/utils-prod.js
@@ -0,0 +1,5 @@
+export function isTeacher() {
+ return Boolean(document.querySelector('.editmode-switch-form'))
+ || Boolean(document.querySelector('a[href*="templates.php"]'))
+ || document.body.classList.contains('editing');
+}