|
|
(未显示同一用户的45个中间版本) |
第1行: |
第1行: |
| mw.loader.load( 'https://polyfill.io/v3/polyfill.min.js?features=es6' );
| | /* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ |
| mw.loader.load( 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js' );
| | //基本函数 |
| | function fadeIn(id,time){ |
| | $("#"+id).fadeIn(time) |
| | } |
| MathJax = { | | MathJax = { |
| tex: { | | tex: { |
| inlineMath: [['$', '$'], ['\\(', '\\)']] | | inlineMath: [['$', '$'], ['\\(', '\\)']] |
| }, | | }, |
| svg: { | | loader: {load: ['[tex]/mhchem']}, |
| fontCache: 'global'
| |
| }
| |
| }; | | }; |
| /* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ | | mw.loader.getScript( 'https://cdn.bootcss.com/mathjax/3.0.5/es5/tex-mml-chtml.js' ) |
| //simplemath | |
| function waitForMathJax($content) {
| |
| if (typeof MathJax === 'undefined') {
| |
| setTimeout(function () { waitForMathJax($content); }, 1000);
| |
| } else {
| |
| MathJax.Hub.Queue(["Typeset", MathJax.Hub, $content[0]]).execute();
| |
| }
| |
| }
| |
| | |
| mw.hook('wikipage.content').add(waitForMathJax);
| |
| //基本函数 | |
| function fadeIn(id,time){
| |
| $("#"+id).fadeIn(time)
| |
| }
| |
/* 这里的任何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' )