Disable MathJax menu

This commit is contained in:
Thorsten Sommer 2026-03-21 20:33:08 +01:00
parent 6222a2a17e
commit 2cfbff0923
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -9,6 +9,12 @@ let mathJaxReadyPromise = null
let batchScheduled = false
let typesetInProgress = false
function applyMathJaxConfiguration() {
window.MathJax = window.MathJax ?? {}
window.MathJax.options = window.MathJax.options ?? {}
window.MathJax.options.enableMenu = false
}
function isMathJaxReady() {
return typeof window.MathJax?.typesetPromise === 'function' || typeof window.MathJax?.typeset === 'function'
}
@ -35,6 +41,7 @@ function ensureMathJaxLoaded() {
return mathJaxReadyPromise
mathJaxReadyPromise = new Promise((resolve, reject) => {
applyMathJaxConfiguration()
let script = document.getElementById(MATH_JAX_SCRIPT_ID)
const onLoad = () => {