Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

Love typesetting? Then i bet you know exactly what MathJax is, but if you don't already know, MathJax is a javascript-based implementation of LaTeX that is compatable with a few different sets of markup.

enter image description here

MathJax is nothing new to the Exchange's chats, ManishEarth wrote a bookmarklet found here. The extension takes the bookmarklet idea to the next level.

The extension utilizes the Google Tabs api to detect when you load a http://chat.stackexchange.com/rooms/* URL. A direct result of this is a small amount of code that gets evaluated on every single onUpdated tab event.

One of the issues inherent in the bookmarklet is that it relies on an ajaxComplete() event handler which, in some (most?) cases, leads to a bug that causes the equation to revert back to text until a new post is made in chat. This extension utilizes a timeout function that updates MathJax on a timer. The default time is 5 seconds, but that can be changed.

The extension adds a new button to each chat window, clicking it will open the settings menu where you can specify a different timeout length. You can also elect to use the old ajax event handler to update MathJax if performance will be an issue. There is also a checkbox to stop the extension from updating.

The extension can be found on the Chrome Store and on GitHub. The packaged .crx file is also included with the source, just in case you despise the Chrome Store.

As always, any suggestions/criticisms are welcome.

share|improve this question

You must log in to answer this question.

Browse other questions tagged .