Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (12 sloc) 1.89 KB
layout title category tags

I spent a few evenings this week putting together an online notepad (paste sites are quite useful, for instance that supported markdown and latex rendering, using the brilliant MathJax project. The site does 3 transformation passes, first turning markdown into html, and then highlighting code with Highlight.js, and rendering math with MathJax.

There are two editting modes, widescreen and narrowscreen. Widescreen gives a live preview on the left and editor on the right, while narrowscreen has a central editor/preview with a toggle between them. With a bit of maintenance code, scrolling/selection is preserved switching between these, so it works rather well even on small screens.

Pages can also be optionally passworded on creation, but cannot be passworded later. They're still viewable, but need a password to save changes to.

The backend is a Node.js instance backed by a MongoDB database. Using Grasshopper and Mongoose, the server is a single file, and only 100 lines long, which also defines all model and index definitions and error handling. Nginx fronts this server and serves the static files, proxying page requests to node.

Current issue I'm working on is XSS hardiness so the site links can be trusted. Issue is that modern browsers seem to reject obvious attacks such as javascript in source attributes, so testing what is actually vulnerable isn't so straightforward. I've tried a few obvious vectors from, none of which seem to work. I don't know whether I care to include IE6 as possible targets, given how many attacks work against it.

The DNS changes are still propagating, but it should be available at sometime today or tomorrow.