forked from EVOgeek/Vmeda.Online
		
	MOBILE-3232 filters: Use svg mathjax output
This commit is contained in:
		
							parent
							
								
									85d5d736d1
								
							
						
					
					
						commit
						44f746bd86
					
				| @ -14,24 +14,24 @@ module.exports = { | ||||
|     dest: '{{WWW}}/' | ||||
|   }, | ||||
|   copyMathJaxMain: { | ||||
|     src: ['{{ROOT}}/node_modules/mathjax/*.js'], | ||||
|     src: ['{{ROOT}}/node_modules/mathjax/MathJax.js'], | ||||
|     dest: '{{WWW}}/lib/mathjax' | ||||
|   }, | ||||
|   copyMathJaxConfig: { | ||||
|     src: ['{{ROOT}}/node_modules/mathjax/config/**/*'], | ||||
|     dest: '{{WWW}}/lib/mathjax/config' | ||||
|   }, | ||||
|   copyMathJaxExtensions: { | ||||
|     src: ['{{ROOT}}/node_modules/mathjax/extensions/**/*'], | ||||
|     dest: '{{WWW}}/lib/mathjax/extensions' | ||||
|   }, | ||||
|   copyMathJaxFonts: { | ||||
|     src: ['{{ROOT}}/node_modules/mathjax/fonts/**/*'], | ||||
|     dest: '{{WWW}}/lib/mathjax/fonts' | ||||
|   copyMathJaxElement: { | ||||
|     src: ['{{ROOT}}/node_modules/mathjax/jax/element/**/*'], | ||||
|     dest: '{{WWW}}/lib/mathjax/jax/element' | ||||
|   }, | ||||
|   copyMathJaxJax: { | ||||
|     src: ['{{ROOT}}/node_modules/mathjax/jax/**/*'], | ||||
|     dest: '{{WWW}}/lib/mathjax/jax' | ||||
|   copyMathJaxInput: { | ||||
|     src: ['{{ROOT}}/node_modules/mathjax/jax/input/**/*'], | ||||
|     dest: '{{WWW}}/lib/mathjax/jax/input' | ||||
|   }, | ||||
|   copyMathJaxOutput: { | ||||
|     src: ['{{ROOT}}/node_modules/mathjax/jax/output/SVG/**/*'], | ||||
|     dest: '{{WWW}}/lib/mathjax/jax/output/SVG' | ||||
|   }, | ||||
|   copyMathJaxLocalization: { | ||||
|     src: ['{{ROOT}}/node_modules/mathjax/localization/**/*'], | ||||
|  | ||||
| @ -32,12 +32,35 @@ export class AddonFilterMathJaxLoaderHandler extends CoreFilterDefaultHandler { | ||||
| 
 | ||||
|     // Default values for MathJax config for sites where we cannot retrieve it.
 | ||||
|     protected DEFAULT_URL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js'; | ||||
|     protected DEFAULT_CONFIG = 'MathJax.Hub.Config({' + | ||||
|             'config: ["Accessible.js", "Safe.js"],' + | ||||
|             'errorSettings: { message: ["!"] },' + | ||||
|             'skipStartupTypeset: true,' + | ||||
|             'messageStyle: "none"' + | ||||
|         '});'; | ||||
|     protected DEFAULT_CONFIG = ` | ||||
|         MathJax.Hub.Config({ | ||||
|             extensions: [ | ||||
|                 "Safe.js", | ||||
|                 "tex2jax.js", | ||||
|                 "mml2jax.js", | ||||
|                 "MathEvents.js", | ||||
|                 "MathZoom.js", | ||||
|                 "MathMenu.js", | ||||
|                 "toMathML.js", | ||||
|                 "TeX/noErrors.js", | ||||
|                 "TeX/noUndefined.js", | ||||
|                 "TeX/AMSmath.js", | ||||
|                 "TeX/AMSsymbols.js", | ||||
|                 "fast-preview.js", | ||||
|                 "AssistiveMML.js", | ||||
|                 "[a11y]/accessibility-menu.js" | ||||
|             ], | ||||
|             jax: ["input/TeX","input/MathML","output/SVG"], | ||||
|             menuSettings: { | ||||
|                 zoom: "Double-Click", | ||||
|                 mpContext: true, | ||||
|                 mpMouse: true | ||||
|             }, | ||||
|             errorSettings: { message: ["!"] }, | ||||
|             skipStartupTypeset: true, | ||||
|             messageStyle: "none" | ||||
|         }); | ||||
|     `;
 | ||||
| 
 | ||||
|     // List of language codes found in the MathJax/localization/ directory.
 | ||||
|     protected MATHJAX_LANG_CODES = [ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user