Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Oh, yeah, and the mathsf-looks-bad isn't your fault either, mathjax uses its own fonts. The font does look like that -- the CS folks use it in allcaps which looks OK. By the way, did you see what Alt-Z does? It may not be useful in your site (it's extremely useful in conjunction with the custom buttons), but since there is no button for, it may escape,your mind. Do you know any way to make this functionality (just a hotkey, no button) evident to others without cluttering the buttonbar with another button?
Later on I'll remove the dollar literals and add an if at the beginning which sets them based on the site. Also, I'm planning to remove everything from the window global object and adding it to some other MathJaxButtons object for cleanliness. Thanks for the code review !:D
Being an amateur programmer, any best-practice tips are really appreciated by me--I've never formally learnt programming(and never had a codereview) so my code tends to be icky sometimes. I never thought I'd need different dollar signs, since I never thought about SE sites that talk about both moolah and math ;-). Interesting concept, and definitely makes it more customizable.
Aah. electroniCS.stack. Exactly why I kept the "stack" in the regex--"cs" is too short and will match half the SE universe (I'll improve the regex). EE.SE wasn't supposed to get the NP button(you can keep it if you guys do use mathsf like the CS folks though)