don't bundle maxjax script tags for apple embeds

This commit is contained in:
Satindar Dhillon 2022-03-24 09:18:07 -07:00
parent 5db0cb12f0
commit f1c20c731f
3 changed files with 18 additions and 7 deletions

View file

@ -41,6 +41,13 @@ struct WebReaderContent {
\(item.title)
</div>
<script type="text/javascript">
window.omnivoreEnv = {
"NEXT_PUBLIC_APP_ENV": "prod",
"NEXT_PUBLIC_BASE_URL": "unset",
"NEXT_PUBLIC_SERVER_BASE_URL": "unset",
"NEXT_PUBLIC_HIGHLIGHTS_BASE_URL": "unset"
}
window.omnivoreArticle = {
id: "\(item.id)",
linkId: "\(item.id)",

File diff suppressed because one or more lines are too long

View file

@ -123,12 +123,16 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element {
return (
<>
<Script async src="/static/scripts/mathJaxConfiguration.js" />
<Script
async
id="MathJax-script"
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
/>
{!props.isAppleAppEmbed && (
<>
<Script async src="/static/scripts/mathJaxConfiguration.js" />
<Script
async
id="MathJax-script"
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
/>
</>
)}
<Box
id="article-container"
css={{