User:Mike Dillon/Scripts/easydom-ext.js
< User:Mike Dillon | Scripts
Note: You may have to bypass your browser’s cache to see the changes. In addition, after saving a sitewide CSS file such as MediaWiki:Common.css, it will take 5-10 minutes before the changes take effect, even if you clear your cache.
- Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh);
- Konqueror and Chrome: click Reload or press F5;
- Opera: clear the cache in Tools → Preferences;
- Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.
- This script lacks a documentation subpage. Please create it.
- Useful links: root page • root page’s subpages • links • redirects • your own
// Requires: [[User:Mike Dillon/Scripts/easydom.js]]
// Build the MathML Easy DOM functions in an anonymous namespace
easydomMath = (function () {
var tagNames = [ "math" ];
// Presentation Markup
tagNames.push(
// Token Elements
"mi", "mn", "mo", "mtext", "mspace", "ms", "mglyph",
// General Layout
"mrow", "mfrac", "msqrt", "mroot", "mstyle", "merror", "mpadded",
"mphantom", "mfenced", "menclose",
// Scripts and Limits
"msub", "msup", "msubsup", "munder", "mover", "munderover", "mmultiscripts",
// Tables
"mtable", "mtr", "mtd", "maligngroup", "malignmark", "mlabeledtr",
// Actions
"maction"
);
// Content Markup
tagNames.push(
// Token Elements
"cn", "ci", "csymbol",
// Basic Content Elements
"apply", "reln", "fn", "interval", "inverse", "sep", "condition",
"declare", "lambda", "compose", "ident", "domain", "codomain", "image",
"domainofapplication", "piecewise", "piece", "otherwise",
// Arithmetic, Algebra and Logic
"quotient", "exp", "factorial", "divide", "max", "min", "minus",
"plus", "power", "rem", "times", "root", "gcd", "and", "or", "xor",
"not", "implies", "forall", "exists", "abs", "conjugate", "arg",
"real", "imaginary", "lcm", "floor", "ceiling",
// Relations
"eq", "neq", "gt", "lt", "geq", "leq", "equivalent", "approx",
"factorof",
// Calculus
"int", "diff", "partialdiff", "lowlimit", "uplimit", "bvar", "degree",
"divergence", "gradient", "curl", "laplacian",
// Theory of Sets
"set", "list", "union", "intersect", "in", "notin", "subset",
"prsubset", "notsubset", "notprsubset", "setdiff", "card",
"cartesianproduct",
// Sequences and Series
"sum", "product", "limit", "tendsto",
// Elementary Classical Functions
"exp", "ln", "log", "logbase", "sin", "cos", "tan", "sec", "csc",
"cot", "sinh", "cosh", "tanh", "sech", "csch", "coth", "arcsin",
"arccos", "arctan", "arccot", "arccsc", "arcsec", "arccosh", "arccoth",
"arccsch", "arcsech", "arcsinh", "arctanh",
// Statistics
"mean", "sdev", "variance", "median", "mode", "moment", "momentabout",
// Linear Algebra
"vector", "matrix", "matrixrow", "determinant", "transpose",
"selector", "vectorproduct", "scalarproduct", "outerproduct",
// Semantic Mapping Elements
"annotation", "semantics", "annotation-xml",
// Constant and Symbol Elements
"integers", "reals", "rationals", "naturalnumbers", "complexes",
"primes", "exponentiale", "imaginaryi", "notanumber", "true", "false",
"emptyset", "pi", "eulergamma", "infinity"
);
return buildEasyDomNamespace({}, {
"namespaceUri": "http://www.w3.org/1998/Math/MathML",
"tagNames": tagNames });
})();
// Build the SVG Easy DOM functions in an anonymous namespace
easydomSvg = buildEasyDomNamespace({}, {
"namespaceUri": "http://www.w3.org/2000/svg",
"tagNames": [
"a", "altGlyph", "altGlyphDef", "altGlyphItem", "animate",
"animateColor", "animateMotion", "animateTransform", "circle",
"clipPath", "color-profile", "cursor", "definition-src", "defs",
"desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer",
"feComposite", "feConvolveMatrix", "feDiffuseLighting",
"feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB",
"feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge",
"feMergeNode", "feMorphology", "feOffset", "fePointLight",
"feSpecularLighting", "feSpotLight", "feTile", "feTurbulence",
"filter", "font", "font-face", "font-face-format", "font-face-name",
"font-face-src", "font-face-uri", "foreignObject", "g", "glyph",
"glyphRef", "hkern", "image", "line", "linearGradient", "marker",
"mask", "metadata", "missing-glyph", "mpath", "path", "pattern",
"polygon", "polyline", "radialGradient", "rect", "script", "set",
"stop", "style", "svg", "switch", "symbol", "text", "textPath",
"title", "tref", "tspan", "use", "view", "vkern"
]
});