SolidOS/mashlib

Mashlib should work as a general purpose library

Closed this issue · 3 comments

timbl commented

In an effort to simplify the databrowser.html code, alll of its JS has been pulled into mashlib.js. This includes the code to look at the URI bar and launch a databrower for that URI. But other things use the mashlib as a general library, and they may not want that to run.

Suggest EITHER

ONE make the mashlib only do that automatically if it finds the table in the HTML with the right class or id

Or TWO pull that launch code out of mashlib and put it back in the databrowser HTML file.
The former may be an interesting way to go, in that one could expand divs in other ways in future.

To launch the URI bar and all of it's functions,

Or TWO pull that launch code out of mashlib and put it back in the databrowser HTML file.
The former may be an interesting way to go, in that one could expand divs in other ways in future.

I suggest to Pull the launch code out and create a file in /form-playground called mashlib.js and serve it up there, that can then serve both the /form-playground.html and browse.html
you can copy the mashlib.js I am using here if it makes it easy.

https://mikeadams1.github.io/browse/index.html

Vinnl commented

I'm not familiar with the form-playground, but #63 does indeed pull the launch code out again. Once it's merged, it should be able to call UI.initialize() like is done here. Thanks for sharing your code :)

That was the mashilb.js from @timbl, I can't take credit for that at all. But I love the way it works thats for sure.