www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 38f5ddc7149603cc3bffd267f18aec0c79396fcb
parent c200dcd5d200108db5479afae0dac3e508676522
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Sat, 19 Feb 2011 09:47:13 -0500

Reword the message, and don't fade it out or use a cookie; it should ALWAYS show and should stay up until explicitly closed

Diffstat:
Mextensions/v1.0-warning.js | 2+-
Munpacked/extensions/v1.0-warning.js | 115+++++++++++++++++++++++++++----------------------------------------------------
2 files changed, 40 insertions(+), 77 deletions(-)

diff --git a/extensions/v1.0-warning.js b/extensions/v1.0-warning.js @@ -12,5 +12,5 @@ * http://www.apache.org/licenses/LICENSE-2.0 */ -(function(c,f){var e="1.0";var a={style:{position:"fixed",bottom:"4em",left:"3em",width:"40em",border:"3px solid #880000","background-color":"#E0E0E0",padding:"1em","font-size":"small","white-space":"normal","border-radius":".75em","-webkit-border-radius":".75em","-moz-border-radius":".75em","-khtml-border-radius":".75em","box-shadow":"4px 4px 10px #AAAAAA","-webkit-box-shadow":"4px 4px 10px #AAAAAA","-moz-box-shadow":"4px 4px 10px #AAAAAA","-khtml-box-shadow":"4px 4px 10px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=3, OffY=3, Color='gray', Positive='true')"},removeAfter:12*1000,fadeoutSteps:10,fadeoutTime:1.5*1000};if(c.Browser.isIE9&&document.documentMode>=9){delete a.style.filter}var d=function(){b.fade++;if(b.timer){delete b.timer}if(b.fade<a.fadeoutSteps){var g=1-b.fade/a.fadeoutSteps;b.div.style.opacity=g;b.div.style.filter="alpha(opacity="+Math.floor(100*g)+")";setTimeout(d,a.fadeoutTime/a.fadeoutSteps)}else{b.div.style.display="none"}};var b={div:null,fade:0};if(!f.Cookie.Get("configWarn").warned){c.Register.StartupHook("onLoad",function(){var g=document.body;if(c.Browser.isMSIE){MathJax.Message.Init();g=document.getElementById("MathJax_MSIE_frame");a.style.position="absolute"}else{delete a.style.filter}a.style.maxWidth=(document.body.clientWidth-75)+"px";b.div=f.addElement(g,"div",{id:"MathJax_ConfigWarning",style:a.style},[["div",{style:{position:"absolute",overflow:"hidden",top:".1em",right:".1em",border:"1px outset",width:"1em",height:"1em","text-align":"center",cursor:"pointer","background-color":"#EEEEEE",color:"#606060","border-radius":".5em","-webkit-border-radius":".5em","-moz-border-radius":".5em","-khtml-border-radius":".5em"},onclick:function(){if(b.div&&b.fade===0){if(b.timer){clearTimeout(b.timer)}b.div.style.display="none"}}},[["span",{style:{position:"relative",bottom:".2em"}},["x"]]]],"The method used by MathJax to load its default configuration file has changed from that used in earlier versions. This page seems to use the older technique, and shoudl be updated. This is explained further at",["p",{style:{"text-align":"center"}},[["a",{href:" http://www.mathjax.org/help/configuration"},["http://www.mathjax.org/help/configuration"]]]]]);if(a.removeAfter){c.Register.StartupHook("End",function(){b.timer=setTimeout(d,a.removeAfter)})}f.Cookie.Set("configWarn",{warned:true})})}})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/v1.0-warning.js"); +(function(b,e){var d="1.0";var a={style:{position:"fixed",bottom:"4em",left:"3em",width:"40em",border:"3px solid #880000","background-color":"#E0E0E0",padding:"1em","font-size":"small","white-space":"normal","border-radius":".75em","-webkit-border-radius":".75em","-moz-border-radius":".75em","-khtml-border-radius":".75em","box-shadow":"4px 4px 10px #AAAAAA","-webkit-box-shadow":"4px 4px 10px #AAAAAA","-moz-box-shadow":"4px 4px 10px #AAAAAA","-khtml-box-shadow":"4px 4px 10px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=3, OffY=3, Color='gray', Positive='true')"}};if(b.Browser.isIE9&&document.documentMode>=9){delete a.style.filter}var c;b.Register.StartupHook("onLoad",function(){var f=document.body;if(b.Browser.isMSIE){MathJax.Message.Init();f=document.getElementById("MathJax_MSIE_frame");a.style.position="absolute"}else{delete a.style.filter}a.style.maxWidth=(document.body.clientWidth-75)+"px";c=e.addElement(f,"div",{id:"MathJax_ConfigWarning",style:a.style},[["div",{style:{position:"absolute",overflow:"hidden",top:".1em",right:".1em",border:"1px outset",width:"1em",height:"1em","text-align":"center",cursor:"pointer","background-color":"#EEEEEE",color:"#606060","border-radius":".5em","-webkit-border-radius":".5em","-moz-border-radius":".5em","-khtml-border-radius":".5em"},onclick:function(){c.style.display="none"}},[["span",{style:{position:"relative",bottom:".2em"}},["x"]]]],"MathJax no longer loads a default configuration file; you must specify such files explicitly. This page seems to use the older default ",["code",{},["config/MathJax.js"]]," file, and so needs to be updated. This is explained further at",["p",{style:{"text-align":"center"}},[["a",{href:"http://www.mathjax.org/help/configuration"},["http://www.mathjax.org/help/configuration"]]]]])})})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/v1.0-warning.js"); diff --git a/unpacked/extensions/v1.0-warning.js b/unpacked/extensions/v1.0-warning.js @@ -42,87 +42,50 @@ "-moz-box-shadow": "4px 4px 10px #AAAAAA", // Forefox 3.5 "-khtml-box-shadow": "4px 4px 10px #AAAAAA", // Konqueror filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=3, OffY=3, Color='gray', Positive='true')" // IE - }, - - removeAfter: 12*1000, // time to show message (in ms) - fadeoutSteps: 10, // fade-out steps - fadeoutTime: 1.5*1000 // fadeout over this amount of time (in ms) - }; - if (HUB.Browser.isIE9 && document.documentMode >= 9) {delete CONFIG.style.filter} - - // - // Set the opacity based on the number of steps taken so far - // and remove the window when it gets to 0 - // - var FADEOUT = function () { - DATA.fade++; if (DATA.timer) {delete DATA.timer} - if (DATA.fade < CONFIG.fadeoutSteps) { - var opacity = 1 - DATA.fade/CONFIG.fadeoutSteps; - DATA.div.style.opacity = opacity; - DATA.div.style.filter = "alpha(opacity="+Math.floor(100*opacity)+")"; - setTimeout(FADEOUT,CONFIG.fadeoutTime/CONFIG.fadeoutSteps); - } else { - DATA.div.style.display = "none"; } }; + if (HUB.Browser.isIE9 && document.documentMode >= 9) {delete CONFIG.style.filter} - // - // Data for the window - // - var DATA = { - div: null, // the message window, when displayed - fade: 0 // number of fade-out steps so far - }; - - if (!HTML.Cookie.Get("configWarn").warned) { - HUB.Register.StartupHook("onLoad",function () { - var frame = document.body; - if (HUB.Browser.isMSIE) { - MathJax.Message.Init(); // make sure MathJax_MSIE_frame exists - frame = document.getElementById("MathJax_MSIE_frame"); - CONFIG.style.position = "absolute"; - } else {delete CONFIG.style.filter} - CONFIG.style.maxWidth = (document.body.clientWidth-75) + "px"; - DATA.div = HTML.addElement(frame,"div",{id:"MathJax_ConfigWarning",style:CONFIG.style},[ - [ - "div",{ - style: { - position:"absolute", overflow:"hidden", top:".1em", right:".1em", - border: "1px outset", width:"1em", height:"1em", - "text-align": "center", cursor: "pointer", - "background-color": "#EEEEEE", color:"#606060", + var DIV; + + HUB.Register.StartupHook("onLoad",function () { + var frame = document.body; + if (HUB.Browser.isMSIE) { + MathJax.Message.Init(); // make sure MathJax_MSIE_frame exists + frame = document.getElementById("MathJax_MSIE_frame"); + CONFIG.style.position = "absolute"; + } else {delete CONFIG.style.filter} + CONFIG.style.maxWidth = (document.body.clientWidth-75) + "px"; + DIV = HTML.addElement(frame,"div",{id:"MathJax_ConfigWarning",style:CONFIG.style},[ + [ + "div",{ + style: { + position:"absolute", overflow:"hidden", top:".1em", right:".1em", + border: "1px outset", width:"1em", height:"1em", + "text-align": "center", cursor: "pointer", + "background-color": "#EEEEEE", color:"#606060", - "border-radius": ".5em", // Opera 10.5 - "-webkit-border-radius": ".5em", // Safari and Chrome - "-moz-border-radius": ".5em", // Firefox - "-khtml-border-radius": ".5em" // Konqueror - }, - onclick: function () { - if (DATA.div && DATA.fade === 0) - {if (DATA.timer) {clearTimeout(DATA.timer)}; DATA.div.style.display = "none"} - } + "border-radius": ".5em", // Opera 10.5 + "-webkit-border-radius": ".5em", // Safari and Chrome + "-moz-border-radius": ".5em", // Firefox + "-khtml-border-radius": ".5em" // Konqueror }, - [["span",{style:{position:"relative", bottom:".2em"}},["x"]]] - ], - "The method used by MathJax to load its default " + - "configuration file has changed from that used in " + - "earlier versions. This page seems to use the " + - "older technique, and shoudl be updated. " + - "This is explained further at", - ["p",{style:{"text-align":"center"}},[ - ["a", - {href:" http://www.mathjax.org/help/configuration"}, - ["http://www.mathjax.org/help/configuration"] - ] - ]] - ]); - if (CONFIG.removeAfter) { - HUB.Register.StartupHook("End",function () - {DATA.timer = setTimeout(FADEOUT,CONFIG.removeAfter)}); - } - HTML.Cookie.Set("configWarn",{warned:true}); - }); - } + onclick: function () {DIV.style.display = "none"} + }, + [["span",{style:{position:"relative", bottom:".2em"}},["x"]]] + ], + "MathJax no longer loads a default configuration file; " + + "you must specify such files explicitly. " + + "This page seems to use the older default ",["code",{},["config/MathJax.js"]], + " file, and so needs to be updated. This is explained further at", + ["p",{style:{"text-align":"center"}},[ + ["a", + {href:"http://www.mathjax.org/help/configuration"}, + ["http://www.mathjax.org/help/configuration"] + ] + ]] + ]); + }); })(MathJax.Hub,MathJax.HTML);