From c9091f2e7560be5d1c240c362805c9a8927cea5b Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Wed, 1 Jun 2022 23:43:31 -0500 Subject: [PATCH] Remove caniuse to always use jax --- judge/template_context.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/judge/template_context.py b/judge/template_context.py index 3c1900d..e518bab 100644 --- a/judge/template_context.py +++ b/judge/template_context.py @@ -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"}