Remove caniuse to always use jax

This commit is contained in:
cuom1999 2022-06-01 23:43:31 -05:00
parent 76b631366b
commit c9091f2e75

View file

@ -6,7 +6,6 @@ from django.contrib.sites.shortcuts import get_current_site
from django.core.cache import cache
from django.utils.functional import SimpleLazyObject, new_method_proxy
from judge.utils.caniuse import CanIUse, SUPPORT
from .models import MiscConfig, NavigationBar, Profile
@ -121,14 +120,10 @@ def site_name(request):
def math_setting(request):
caniuse = CanIUse(request.META.get("HTTP_USER_AGENT", ""))
if request.user.is_authenticated:
engine = request.profile.math_engine
else:
engine = settings.MATHOID_DEFAULT_TYPE
if engine == "auto":
engine = (
"mml" if bool(settings.MATHOID_URL) and caniuse.mathml == SUPPORT else "jax"
)
return {"MATH_ENGINE": engine, "REQUIRE_JAX": engine == "jax", "caniuse": caniuse}
engine = "jax"
return {"MATH_ENGINE": engine, "REQUIRE_JAX": engine == "jax"}