ArthurSonzogni / Diagon

Interactive ASCII art diagram generators. :star2:
https://arthursonzogni.com/Diagon/
MIT License
1.48k stars 56 forks source link

provide a downloadable offline page. #9

Closed ArthurSonzogni closed 2 years ago

ArthurSonzogni commented 3 years ago

The website is already available offline thanks to service worker, but users might also want an offline page to download.

iyutr commented 3 years ago

Please compile for older, JS-only compatible web-browsers, if it's not difficult

ArthurSonzogni commented 3 years ago

This is C++ code compiled toward WebAssembly.

I guess I could used tools to compile webAssembly toward JavaScript, but this sounds a lot of works (~10days). I am not sure this is worth it, I am not sure this would benefits a lot of users.

What kind of browsers do you use? What's your use case?

Le jeu. 15 oct. 2020 à 23:27, iyuter notifications@github.com a écrit :

Please compile for older, JS-only compatible web-browsers, if it's not difficult

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ArthurSonzogni/Diagon/issues/9#issuecomment-709599874, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEJ4QST2F7JKNH3C4TJTHTSK5SK5ANCNFSM4SGADSDQ .

iyutr commented 3 years ago

Sorry, days of useless work are certainly not worth wasting. Just make it as a downloadable package, please

ArthurSonzogni commented 3 years ago

If the website is opened via a local file, then fetching the webassembly code would trigger this error:

Access to XMLHttpRequest at 'file:///home/sonzogna/programmation/real/Diagon/build_emscripten/diagon.wasm' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.

Would it be good enough if I also provide the command to run a local server and open the page?

#! /bin/bash
python3 -m SimpleHTTPServer 8080
iyutr commented 3 years ago

Could you please share your current build, so I can test in Firefox/Palemoon by bypassing CORS? For other users it is helpful to know how to run a local Python server. Thank you for this program and for your diligence, perfecting it.

ArthurSonzogni commented 3 years ago

A build would look like this: https://github.com/ArthurSonzogni/Diagon/suites/2305312146/artifacts/48367187

iyutr commented 3 years ago

It really works offline for me, without Python server, thank you! In Palemoon 29.1. The issue is resolved

ArthurSonzogni commented 2 years ago

I am closing this.

The downloadable offline page is produced in the release page: https://github.com/ArthurSonzogni/Diagon/releases/

For instance: https://github.com/ArthurSonzogni/Diagon/releases/download/v1.0.127/diagon-Web.zip