The first step is to install Emscripten, and update to the latest version of Sniff. With that done, you can write your Sniff program pretty much as normal, and compile it with the command "jsniff". This will produce a version of your code which you can then use online! That's basically all there is to it, though there are couple of minor things you need to watch for.
In addition to the actually js output file, we also generate an html file, so you can run your program by just opening the html file. However most modern web browsers won't let a web page start loading up file from your local hard disk. You need to place the files on a web server to access them (or use Firefox which still lets you do this!).
Similarly if you want to access any files - for example images to use in your game, you need to bundle them into the code. To make that easy, just add the names of any files or folders you want to include in the bundle after the .sniff filename on the command line. For example:
jsniff asteroids.sniff *.bmp
jsniff adventure.sniff objects rooms
Provided you bundle the files in at compile time, you can read files just as normal. You can also write files, but they get thrown away when your program finishes - thats just the web way!
The only other weirdness is that "ask" will pop up a modal dialog box, pausing your whole program. It works fine, but you can't run other scripts while the "ask" box is on screen.
Appart from that it just works. If you're running some kind of workshop you can write code to run on the local machine, and when you're done just put it on a website so everyone can see it!