From 4882c5ca3a65075e03595588ef3780a36bc74b15 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 13 Jun 2026 13:04:07 +0200 Subject: move generic js into root --- js/utils-prod.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 js/utils-prod.js (limited to 'js/utils-prod.js') diff --git a/js/utils-prod.js b/js/utils-prod.js new file mode 100644 index 0000000..1dd7e8e --- /dev/null +++ b/js/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'); +} -- cgit v1.2.3