JSHint: Fix quotmark and semicolon warnings.
Change-Id: I2ab9e7ce308fd47336f86d2571e8450347321f10
This commit is contained in:
parent
33c30a0d6c
commit
ca6a896cb0
|
@ -2,21 +2,21 @@
|
||||||
* From https://en.wikipedia.org/wiki/User:Nageh/mathJax.js
|
* From https://en.wikipedia.org/wiki/User:Nageh/mathJax.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( typeof(mathJax) === "undefined" ) mathJax = {};
|
if ( typeof mathJax === 'undefined' ) mathJax = {};
|
||||||
|
|
||||||
mathJax.version = "0.2";
|
mathJax.version = '0.2';
|
||||||
|
|
||||||
mathJax.loaded = false;
|
mathJax.loaded = false;
|
||||||
|
|
||||||
mathJax.Config = function() {
|
mathJax.Config = function() {
|
||||||
MathJax.Hub.Config({
|
MathJax.Hub.Config({
|
||||||
root: mediaWiki.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax',
|
root: mediaWiki.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax',
|
||||||
config: ["TeX-AMS-texvc_HTML.js"],
|
config: ['TeX-AMS-texvc_HTML.js'],
|
||||||
"v1.0-compatible": false,
|
'v1.0-compatible': false,
|
||||||
styles: { ".mtext": { "font-family": "sans-serif ! important", "font-size": "80%" } },
|
styles: { '.mtext': { 'font-family': 'sans-serif ! important', 'font-size': '80%' } },
|
||||||
displayAlign: "left",
|
displayAlign: 'left',
|
||||||
menuSettings: { zoom: "Click" },
|
menuSettings: { zoom: 'Click' },
|
||||||
"HTML-CSS": { imageFont: null, availableFonts: ["TeX"] }
|
'HTML-CSS': { imageFont: null, availableFonts: ['TeX'] }
|
||||||
});
|
});
|
||||||
MathJax.OutputJax.fontDir = mathJax.fontDir = mediaWiki.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax/fonts';
|
MathJax.OutputJax.fontDir = mathJax.fontDir = mediaWiki.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax/fonts';
|
||||||
};
|
};
|
||||||
|
@ -41,20 +41,20 @@ mathJax.Load = function(element) {
|
||||||
};
|
};
|
||||||
|
|
||||||
mathJax.Init = function() {
|
mathJax.Init = function() {
|
||||||
this.Load( document.getElementById("bodyContent") || document.body );
|
this.Load( document.getElementById('bodyContent') || document.body );
|
||||||
|
|
||||||
// compatibility with wikEd
|
// compatibility with wikEd
|
||||||
if ( typeof(wikEd) == "undefined" ) { wikEd = {}; }
|
if ( typeof(wikEd) == 'undefined' ) { wikEd = {}; }
|
||||||
if ( typeof(wikEd.config) == "undefined" ) { wikEd.config = {}; }
|
if ( typeof(wikEd.config) == 'undefined' ) { wikEd.config = {}; }
|
||||||
if ( typeof(wikEd.config.previewHook) == "undefined" ) { wikEd.config.previewHook = []; }
|
if ( typeof(wikEd.config.previewHook) == 'undefined' ) { wikEd.config.previewHook = []; }
|
||||||
wikEd.config.previewHook.push( function(){ if (window.mathJax.Load(document.getElementById("wikEdPreviewBox") || document.body)) MathJax.Hub.Queue(["Typeset", MathJax.Hub, "wikEdPreviewBox"]) } );
|
wikEd.config.previewHook.push( function(){ if (window.mathJax.Load(document.getElementById('wikEdPreviewBox') || document.body)) MathJax.Hub.Queue(['Typeset', MathJax.Hub, 'wikEdPreviewBox']); } );
|
||||||
|
|
||||||
// compatibility with ajaxPreview
|
// compatibility with ajaxPreview
|
||||||
this.oldAjaxPreviewExec = window.ajaxPreviewExec;
|
this.oldAjaxPreviewExec = window.ajaxPreviewExec;
|
||||||
window.ajaxPreviewExec = function(previewArea) {
|
window.ajaxPreviewExec = function(previewArea) {
|
||||||
if ( typeof(mathJax.oldAjaxPreviewExec) !== "undefined" ) mathJax.oldAjaxPreviewExec(previewArea);
|
if ( typeof(mathJax.oldAjaxPreviewExec) !== 'undefined' ) mathJax.oldAjaxPreviewExec(previewArea);
|
||||||
if ( mathJax.Load(previewArea) ) MathJax.Hub.Queue( ["Typeset", MathJax.Hub, previewArea] );
|
if ( mathJax.Load(previewArea) ) MathJax.Hub.Queue( ['Typeset', MathJax.Hub, previewArea] );
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery( document ).ready( function() {
|
jQuery( document ).ready( function() {
|
||||||
|
|
Loading…
Reference in New Issue