jenkins-bot has submitted this change and it was merged.

Change subject: MathJax: Remove support for wikEd and AjaxPreview
......................................................................


MathJax: Remove support for wikEd and AjaxPreview

With the new renderTex hook of https://gerrit.wikimedia.org/r/61183
there is no need for hardcoded support for these 2 scripts. The
scripts in question should call the hook themselves.

PS2: Fix wikEd reference of jsHint
Supersedes: https://gerrit.wikimedia.org/r/23073

Bug: 35478
Change-Id: I9811832430e9ddd8a4c03f265d07529a76efc38a
---
M modules/ext.math.mathjax.enabler.js
1 file changed, 2 insertions(+), 33 deletions(-)

Approvals:
  Physikerwelt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ext.math.mathjax.enabler.js 
b/modules/ext.math.mathjax.enabler.js
index f3ab7cd..fe6de6c 100644
--- a/modules/ext.math.mathjax.enabler.js
+++ b/modules/ext.math.mathjax.enabler.js
@@ -1,7 +1,7 @@
 /**
  * From https://en.wikipedia.org/wiki/User:Nageh/mathJax.js
  */
-/*global mathJax:true, MathJax, wikEd:true */
+/*global mathJax:true, MathJax */
 ( function ( mw, $ ) {
   if ( typeof mathJax === 'undefined' ) {
     mathJax = {};
@@ -86,39 +86,8 @@
     return false;
   };
 
-  mathJax.Init = function () {
-    this.Load( document.getElementById('bodyContent') || document.body );
-
-    // compatibility with wikEd
-    if ( typeof wikEd === 'undefined' ) {
-      wikEd = {};
-    }
-    if ( wikEd.config === undefined ) {
-      wikEd.config = {};
-    }
-    if ( 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']);
-      }
-    } );
-
-    // compatibility with ajaxPreview
-    this.oldAjaxPreviewExec = window.ajaxPreviewExec;
-    window.ajaxPreviewExec = function (previewArea) {
-      if ( mathJax.oldAjaxPreviewExec !== undefined ) {
-        mathJax.oldAjaxPreviewExec(previewArea);
-      }
-      if ( mathJax.Load(previewArea) ) {
-        MathJax.Hub.Queue( ['Typeset', MathJax.Hub, previewArea] );
-      }
-    };
-  };
-
   $( document ).ready( function () {
-    mathJax.Init();
+    mathJax.Load();
   } );
 
 }( mediaWiki, jQuery ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/61184
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9811832430e9ddd8a4c03f265d07529a76efc38a
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: TheDJ <hartman.w...@gmail.com>
Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org>
Gerrit-Reviewer: Physikerwelt <w...@physikerwelt.de>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to