|
|
(未显示同一用户的40个中间版本) |
第4行: |
第4行: |
| $("#"+id).fadeIn(time) | | $("#"+id).fadeIn(time) |
| } | | } |
| mw.loader.load( 'https://polyfill.io/v3/polyfill.min.js?features=es6' );
| |
| mw.loader.load( '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML' );
| |
| MathJax = { | | MathJax = { |
| tex: { | | tex: { |
| inlineMath: [['$', '$'], ['\\(', '\\)']], | | inlineMath: [['$', '$'], ['\\(', '\\)']] |
| packages: { '[+]': ['mhchem'] } //加载化学插件 如果只是数学可以不用加
| |
| }, | | }, |
| loader: { load: ['[tex]/mhchem'] }, | | loader: {load: ['[tex]/mhchem']}, |
| svg: {
| |
| fontCache: 'global'
| |
| }
| |
| }; | | }; |
| function waitForMathJax($content) {
| | mw.loader.getScript( 'https://cdn.bootcss.com/mathjax/3.0.5/es5/tex-mml-chtml.js' ) |
| if (typeof MathJax === 'undefined') {
| |
| setTimeout(function () { waitForMathJax($content); }, 1000);
| |
| } else {
| |
| MathJax.Hub.Queue(["Typeset", MathJax.Hub, $content[0]]).execute();
| |
| }
| |
| }
| |
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */
//基本函数
function fadeIn(id,time){
$("#"+id).fadeIn(time)
}
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
},
loader: {load: ['[tex]/mhchem']},
};
mw.loader.getScript( 'https://cdn.bootcss.com/mathjax/3.0.5/es5/tex-mml-chtml.js' )