lib/gollum/frontend/public/javascript/MathJax/config/MMLorHTML.js in gollum-1.1.1 vs lib/gollum/frontend/public/javascript/MathJax/config/MMLorHTML.js in gollum-1.2.0

- old
+ new

@@ -1,63 +1,18 @@ -/************************************************************* - * - * MathJax/extensions/MMLorHTML.js +/* + * ../SourceForge/trunk/mathjax/config/MMLorHTML.js * - * Chooses between the NativeMML and HTML-CSS output jax depending - * on the capabilities of the browser and configuration settings - * of the page. - * - * This file should be added to the config array when configuring - * MathJax. Note that if you include this, you should NOT include - * an output jax in the jax array (it will be added for you by - * this file). - * - * --------------------------------------------------------------------- - * * Copyright (c) 2010 Design Science, Inc. + * + * Part of the MathJax library. + * See http://www.mathjax.org for details. * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0; * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ -(function (HUB) { - var CONFIG = MathJax.Hub.Insert({prefer: "HTML"},(MathJax.Hub.config.MMLorHTML||{})); +MathJax.Unpack([ + ['(function(c){var i="1.0";var g=','MathJax.Hub','.Insert({prefer:{MSIE:"MML",Firefox:"MML",Opera:"HTML",other:"HTML"}},(',1,'.config.MMLorHTML||{}));var e={Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4};var h=(c','.Browser','.version==="0.0"||','c.Browser.versionAtLeast','(e[c',5,']||0));var b;try{new ActiveXObject("MathPlayer.Factory.1");b=true}catch(d){b=false}var f=(c',5,'.isFirefox&&',7,'("1.5"))||(c',5,'.isMSIE&&b)||(c',5,'.isOpera&&',7,'("9.52"));var a=(g.prefer&&typeof(g.prefer)==="object"?g.prefer[',1,5,']||g.prefer.other||"HTML":g.prefer);if(h||f){if(f&&(a==="MML"||!h)){','c.config.jax.unshift("output/','NativeMML")}else{',24,'HTML-CSS")}}else{c.PreProcess','.disabled=true;','c.prepareScripts',28,'MathJax.Message.Set("Your browser does not support MathJax",null,4000);c.Startup.signal.Post("MathJax not supported")}})(',1,');MathJax.Ajax.loadComplete("[MathJax]/config/MMLorHTML.js");'] +]); - var MINBROWSERVERSION = { - Firefox: 3.0, - Opera: 9.52, - MSIE: 6.0, - Chrome: 0.3, - Safari: 2.0, - Konqueror: 4.0 - }; - - var canUseHTML = (HUB.Browser.version === "0.0" || - HUB.Browser.versionAtLeast(MINBROWSERVERSION[HUB.Browser]||0.0)); - - var MathPlayer; try {new ActiveXObject("MathPlayer.Factory.1"); MathPlayer = true} catch(err) {MathPlayer = false}; - - var canUseMML = (HUB.Browser.isFirefox && HUB.Browser.versionAtLeast("1.5")) || - (HUB.Browser.isMSIE && MathPlayer) || - (HUB.Browser.isOpera && HUB.Browser.versionAtLeast("9.52")); - if (canUseHTML || canUseMML) { - if (canUseMML && (CONFIG.prefer === "MML" || !canUseHTML)) - {HUB.config.jax.push("output/NativeMML")} else {HUB.config.jax.push("output/HTML-CSS")} - } else { - HUB.PreProcess.disabled = true; - HUB.prepareScripts.disabled = true; - MathJax.Message.Set("Your browser does not support MathJax",null,4000); - HUB.Startup.signal.Post("MathJax not supported"); - } - -})(MathJax.Hub); - -MathJax.Ajax.loadComplete("[MathJax]/config/MMLorHTML.js");