From 0b4b10ff578932e15c461649238aab2e7dbe1008 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Mon, 30 Mar 2015 17:44:56 -0400 Subject: [PATCH] Compensate for removed MathEvents.js. Resolves issues #85, #66, and #82. --- lib/mj-page.js | 4 ++++ lib/mj-single.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/mj-page.js b/lib/mj-page.js index 457d475d..4356d991 100644 --- a/lib/mj-page.js +++ b/lib/mj-page.js @@ -158,6 +158,10 @@ function ConfigureMathJax() { delete MathJax.Hub.config.styles; // don't need any styles MathJax.Hub.Startup.MenuZoom = function () {}; // don't load menu or zoom code + MathJax.Extension.MathEvents = { + Event:{}, Touch:{}, Hover:{} // fake structure to avid errors + }; + MathJax.Ajax.loaded[MathJax.Ajax.fileURL("[MathJax]/extensions/MathEvents.js")] = true; // // When creating stylesheets, no need to wait for them diff --git a/lib/mj-single.js b/lib/mj-single.js index ef949ce3..87293420 100644 --- a/lib/mj-single.js +++ b/lib/mj-single.js @@ -159,6 +159,10 @@ function ConfigureMathJax() { delete MathJax.Hub.config.styles; // don't need any styles MathJax.Hub.Startup.MenuZoom = function () {}; // don't load menu or zoom code + MathJax.Extension.MathEvents = { + Event:{}, Touch:{}, Hover:{} // fake structure to avid errors + }; + MathJax.Ajax.loaded[MathJax.Ajax.fileURL("[MathJax]/extensions/MathEvents.js")] = true; // // When creating stylesheets, no need to wait for them