MathJax: Remove our RGB extension again, added in MathJax 2.1

Turns out that with the upgrade to 2.1 this is now included in core
MathJax, so we don't need the extension anymore.
http://docs.mathjax.org/en/latest/whats-new-2.1.html

Change-Id: I653c05aaf6d94851fdf6b1649d2d5c7477d46b7e
This commit is contained in:
Derk-Jan Hartman 2013-04-28 20:52:55 +02:00
parent 4aa2741e8f
commit 83b4107df4

View file

@ -7,22 +7,6 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var MML = MathJax.ElementJax.mml;
/*
* Get an RGB color (a triplet of values between 0 and 255)
*/
MathJax.Extension["TeX/color"].get_RGB = function (rgb) {
rgb = rgb.split(/,/); var RGB = "#";
if (rgb.length !== 3) {this.TEX.Error("RGB colors require 3 decimal numbers")}
for (var i = 0; i < 3; i++) {
if (!rgb[i].match(/^(\d{1,3})$/)) {this.TEX.Error("Invalid decimal number")}
var n = parseInt(rgb[i], 10);
if (n < 0 || n > 255) {this.TEX.Error("RGB values must be between 0 and 255")}
n = n.toString(16); if (n.length < 2) {n = "0"+n}
RGB += n;
}
return RGB;
}
MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions,{
mathchar0mi: {