From aa060c946d914affc7981f0d76a7edeb27e1cfe1 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 29 May 2026 14:52:00 +0200 Subject: fix isTeacher detection and use common utils --- utils-prod.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 utils-prod.js (limited to 'utils-prod.js') 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'); +} -- cgit v1.2.3