You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
536 B
JavaScript
22 lines
536 B
JavaScript
2 months ago
|
(() => {
|
||
|
let className = 'math-tex';
|
||
|
if (document.currentScript) {
|
||
|
let urlParts = document.currentScript.getAttribute('src').split('?');
|
||
|
if (urlParts[1]) {
|
||
|
let queryParams = urlParts[1].split('&');
|
||
|
for (let i = 0; i < queryParams.length; i++) {
|
||
|
let param = queryParams[i].split('=');
|
||
|
if (param[0] == 'class') {
|
||
|
className = param[1];
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
MathJax = {
|
||
|
options: {
|
||
|
processHtmlClass: className,
|
||
|
ignoreHtmlClass: '.*'
|
||
|
}
|
||
|
};
|
||
|
})();
|