-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn user if MathJax can't be fetched from notebook closes #744 #868
Conversation
@@ -49,6 +56,12 @@ | |||
<span id="kernel_status">Idle</span> | |||
</div> | |||
|
|||
<div id="MatjaxFetchingWarning"> | |||
There was an issues trying to fetch MathJax.js from the internet. You might |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: issue
merge '<script>' balises. Improve message text and style. Remove instead of hide
Fixed, |
@@ -12,7 +12,13 @@ | |||
|
|||
<!-- <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" charset="utf-8"></script> --> | |||
<script type='text/javascript' src='static/mathjax/MathJax.js?config=TeX-AMS_HTML' charset='utf-8'></script> | |||
<script type="text/javascript"> | |||
<script language="Javascript"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it, language="javascript"
is deprecated, and type="text/javascript"
is officially the way to declare script type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never done javascript before, so I trust you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I didn't know either, but when I saw the inconsistency I Google'd it. We are pretty much all js novices here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Fri, Oct 14, 2011 at 11:48 AM, Min RK
reply@reply.github.com
wrote:
No worries, I didn't know either, but when I saw the inconsistency I Google'd it. We are pretty much all js novices here.
Very true. It took me 2hours last night to get CodeMirror to toggle
line-numbers on a per cell basis :) (pull request coming soon after I
clean it up a little).
Question: are we ready to merge this one, or is further cleanup needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very true. It took me 2hours last night to get CodeMirror to toggle
line-numbers on a per cell basis :) (pull request coming soon after I
clean it up a little).
I though I was the only one :-)
Question: are we ready to merge this one, or is further cleanup needed?
Might want to test on IE6 ?
Add a message for people with JS not activated ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Fri, Oct 14, 2011 at 1:16 PM, Bussonnier Matthias
reply@reply.github.com
wrote:
Might want to test on IE6 ?
We don't support IE at all, period. Let alone something as ancient
as IE6. IE has no websocket support, so none of the notebook will
ever work there until they add websockets.
Add a message for people with JS not activated ?
That, on the other hand, would be good, since pretty much nothing
would work without JS. Giving an informative error would be good
usability-wise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IE was a joke of course.
I have no idea how to add a message that will be visible only to browser without JS, without having it "poping up" for a few millisecond for user having JS...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that you can't even get to the notebook page without js, since our whole UI (including the frontpage) is jQuery.
A single line of plaintext 'IPython notebook requires javascript' shouldn't be bothersome. I don't think there's any need for more information than that these days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also a reason our pre-load warning messages may linger longer than others is that MathJax is huge, so loading up a notebook page can take a significant fraction of a second.
This looks good, but as it is, you can see the MathJax warning briefly on every notebook load. We should only draw the warning when the MathJax test fails, so initially it should have function CheckMathJax(){
var div=document.getElementById("MatjaxFetchingWarning");
if(window.MathJax){
document.body.removeChild(div);
}else{
div.style.display = "block";
}
} |
also fix Matjax->MathJax
True, I was still thinking as if it would be executed after mathjax.js was loaded... and that the 'else' would then never be executed |
Thanks a lot for the work! Made some minor edits to the message before pushing. |
just put this in notebook.html
And hide it at
<body>
'sonload
ifwindow.mathjax
found.