1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

Added: MathJax (minimal) v2.7.5 (#75)

This commit is contained in:
nobody
2021-05-26 06:56:35 +02:00
parent 5f977b68a4
commit 6ee175eabb
49 changed files with 1277 additions and 2 deletions

View File

@ -56,6 +56,7 @@ const Resource = {
'MAPPING_EXPRESSION': /\.map$/i,
'VERSION_EXPRESSION': /(?:\d{1,2}\.){1,3}\d{1,2}(?:-\d)?|latest/,
'SINGLE_NUMBER_EXPRESSION': /^\D+\d\D+$/,
'MATHJAX': /\/\w.*(?:\d{1,2}\.){1,3}\d{1,2}(?:-\d)?\/|\/latest\//,
'VERSION_PLACEHOLDER': '{version}'
};
@ -274,6 +275,54 @@ const IgnoredHost = {
'fonts.gstatic.com': true,
};
/**
* MathJax is a very large library with over 30,000 files.
* That is why it is better to specify each one here.
*
* https://codeberg.org/nobody/LocalCDN/issues/75
*/
const MathJaxFiles = {
'config/TeX-AMS_HTML-full.js': true,
'config/TeX-MML-AM_CHTML.js': true,
'extensions/TeX/begingroup.js': true,
'extensions/TeX/mhchem3/mhchem.js': true,
'extensions/MathMenu.js': true,
'extensions/MathZoom.js': true,
'jax/output/HTML-CSS/imageFonts.js': true,
'jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js': true,
'jax/output/HTML-CSS/fonts/TeX/fontdata.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Latin1Supplement.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscSymbols.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MathOperators.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Main.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BoxDrawing.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BBBold.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LetterlikeSymbols.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/EnclosedAlphanum.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Dingbats.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LatinExtendedA.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/CombDiacritMarks.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Arrows.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeometricShapes.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeneralPunctuation.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscMathSymbolsB.js': true,
'jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GreekAndCoptic.js': true,
'jax/output/HTML-CSS/autoload/multiline.js': true,
'jax/output/HTML-CSS/autoload/menclose.js': true,
'jax/output/HTML-CSS/jax.js': true,
'jax/output/HTML-CSS/config.js': true,
'jax/output/CommonHTML/fonts/TeX/fontdata.js': true,
'jax/output/CommonHTML/autoload/mtable.js': true,
'jax/output/CommonHTML/jax.js': true,
'jax/element/mml/optable/Latin1Supplement.js': true,
'jax/element/mml/optable/MathOperators.js': true,
'jax/element/mml/optable/BasicLatin.js': true,
};
// Supported charsets for TextDecoder()
// https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/TextDecoder
const EncodingTypes = {