diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-05-29 14:52:00 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-05-29 14:52:00 +0200 |
| commit | aa060c946d914affc7981f0d76a7edeb27e1cfe1 (patch) | |
| tree | eb842d82c8a3d36c66e538ce879f326aec3e93c9 /utils-prod.js | |
| parent | 983a2303fc0617b9fcb94a2f814fc90693977b5e (diff) | |
| download | bycs-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.js | 5 |
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'); +} |
