Hacker News new | ask | show | jobs
by timcwinkler 1838 days ago
This is a very simple Javascript notebook in one completely self-contained HTML file. It was inspired by the concept of Jupyter notebooks.

You can enter Javascript code and execute it in the browser, completely locally and possibly offline. The performance can be pretty good.

You can put in HTML documentation and also use HTML to provide UI for simple tools.

All you need is the js+help.html file, which contains basic documentation. You can clear out the notebook and save off various javascript experiments in different files.

I have mostly used this with Chrome. I have tried it with Firefox, and also on various OSs (Linux/Windows/Mac). The main compatibility issue is the handling of the downloading of files and how that varies in different contexts.

I just recently modified this to work better for the mobile (small screen) case. I have done testing after these changes, but not extensive testing.

It is easy to extract a CSS and a JS file that could be stored separately to make for very small notebook files.

I deliberately chose the "Unlicense". (I might claim copyright, but only to discourage someone else from claiming copyright.) The coding style could probably be improved, but I wanted not to use new features to maintain compatibility with older browsers.

I will try to respond to comments and questions, but may be a little slow.

2 comments

Thanks to freeCandy and the githack service, here is a link that can be directly used:

https://rawcdn.githack.com/timcwinkler/javascript-notebook/9...

(There must be some resource limits, but I don't know what they are. Maybe there aren't limits? This is fast.)

Have created a live link via github.io

https://timcwinkler.github.io/js+help.html