Closed benja-johnny closed 5 years ago
Added bookmarklet.js, very alpha.
can you please tell me what are the basic differences in repo and your fork Sorry for asking this dumb question but i am a newbie in JS
It’s a good question, since my commits are all over the place.
Main difference is it uses lz-string base-64 compress/decompress instead of btoa/atob. The other difference is the Editor has an Encoded Input button to easily copy-paste the encoded string part of the URL.
There’s also a bookmarklet, which only works with the original jstrieb/urlpages, because it’d need to contain lz-string-1.4.4.js to use that type of compression, which is too much for a bookmarklet AFAIK.
Tried using brotli instead of lz-string, but couldn’t get brotli/compress to work. https://github.com/foliojs/brotli.js/issues/20
can you please tell me what are the basic differences in repo and your fork Sorry for asking this dumb question but i am a newbie in JS
It’s a good question, since my commits are all over the place.
Main difference is it uses lz-string base-64 compress/decompress instead of btoa/atob. The other difference is the Editor has an Encoded Input button to easily copy-paste the encoded string part of the URL.
There’s also a bookmarklet, which only works with the original jstrieb/urlpages, because it’d need to contain lz-string-1.4.4.js to use that type of compression, which is too much for a bookmarklet AFAIK.
Thanks for answering
@benja-johnny The live rendering of html is not being done in editor as shown below:
@benja-johnny The live rendering of html is not being done in editor as shown below:
@aliglelo Thanks for checking it out, will address this issue!
The parser (parseHTML function) is still very alpha, so right now if you type in the HTML textbox, it just sorts it between the \<body> tags. You can see this if you press the Copy Code button after typing something in the textboxes.
Also, just noticed that the Download Code button isn’t working properly either, will be fixing that too. Had to change a variable.
I’m aware that I made so many changes, that pulling this might not be okay. Leaving the request open.
To elaborate on why this needs an HTML parser: unnecessary code needs to be scraped from a webpage to make the URL shorter. It can be done in the editor by hand, but that isn’t user friendly.
To elaborate on why this needs an HTML parser: unnecessary code needs to be scraped from a webpage to make the URL shorter. It can be done in the editor by hand, but that isn’t user friendly.
Exactly
Yes it now works if we copy code and then run it but as far as live rendering is concerned It still seems to be not working for me
@aliglelo Just tested on Safari, FF, Chrome. Seems to work if I just type something in the first textbox. (Also noticed other bugs, will fix.) It’s still too early for these types of optimizations, since the parser is barely functional. I’ll be improving it next week. Thanks again for trying it out, though. This was the best result I could get (Safari v12.1.1): On FF and Chrome the same link shows a blank editor preview, sadly. Will be fixing that as well. Link to the thing that's pictured (too long for tinyurl): https://pastebin.com/eM161UPX (This works for me on all 3 browsers.)
Probably a good idea to have this on a separate fork. Closing the request, for now.
Yes it now works if we copy code and then run it but as far as live rendering is concerned It still seems to be not working for me
@aliglelo Just tested on Safari, FF, Chrome. Seems to work if I just type something in the first textbox. (Also noticed other bugs, will fix.) It’s still too early for these types of optimizations, since the parser is barely functional. I’ll be improving it next week. Thanks again for trying it out, though. This was the best result I could get (Safari v12.1.1): On FF and Chrome the same link shows a blank editor preview, sadly. Will be fixing that as well. Link to the thing that's pictured (too long for tinyurl): pastebin.com/eM161UPX (This works for me on all 3 browsers.)
Excellent work
Excellent work
@aliglelo Thanks; I can only take credit for a few lines though!
Added a few things:
Plus some minor beautification.