I totally agree with you guys but this macro was mostly an experiment and I made it for my personal use only. I provided it in this forum as an example of what can be achieved with SVG and jQuery in a Custom HTML Prompt
If I had to make a macro that should be distributed for the masses, I probably would join the jQuery library within a macro folder and I would use a relative link to avoid the need of an internet connection. But we should add a variable for this relative link and ask people to update it to set the root to the jQuery library.
I understand you were doing it for yourself, and I didn’t mean to be critical. It’s just that seeing how you used it, I thought I’d put the question out there.
I’ve written and uploaded multiple macros that do exactly what you suggested. I’ve got code that the macro can use to make sure it knows where its “resources” folder is, and all of that kind of stuff. I’m not suggesting you need it, but perhaps someone will, so I suppose I should upload a demo.
It’s worth considering just running a webserver on localhost for this kind of thing. Not for anything you are publishing, but for personal hacks. Once you have a little server that’s always running, there’s tons of other small things it can be used for.
I personally use Bottle or CherryPy, just because I’m most comfortable writing servers in Python. You can use anything though.
Whenever I ran a server like this, I mainly used it to host JS libraries at paths I could easily remember, like /static/jquery.js, and to keep often needed code and data in memory. For example, scripts that provide output for the tmux status bar can be converted to request handlers to save firing up an interpreter and reading a script and its deps from disk once every second.