Hey, I thought this tool was going to query relays for the user and try to find where the note was, not just ask us to select a bunch of relays. Am I confused?

Reply to this note

Please Login to reply.

Discussion

The static URL is below.

The issue I had was when I wrote it in plain JavaScript was I needed a better UI template engine. Then I ported the code to Svelte to finish the relay import from extension and kind 10002 query across relays.

I then found out that Svelte is a real pain to export a single self-contained file (they love server side rendering apparently). Maybe someone can assist?

The GitHub repo version can be run locally and has those two features included. I don’t have a hosted version of the Svelte at present.

The logic at present is to rely on a bootstrap list, your browser extension relay data, and kind 10002 + any custom relays you wish to add - and broadcast the deletion to them. It doesn’t connect to relays first and ask which relays have that event - it just sends the deletion proactively to all loaded/selected relays.

If someone wanted it to blast deletion out to 100s of relays blindly, they can edit the bootstrap relay list in the code and it should work fine.

One limitation with the browser extensions is they can be very noisey with too. I made buttons for what could have been loaded (mostly) automatically, because at least with Nostore, it asks to read pubkey, then asks to read relays, and then asks to sign event. Lots of approval popups.

Everything can definitely be tweaked or improved. Things like private relays lists will need support

https://cdn.nostrgraph.net/public/delete.html

Svelte doesn't have anything to do with SSR. Maybe you used sveltekit or something weirder I don't understand. nostr:npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn may know.

You say you're using kind 10002, but I only see a static relay list, was that supposed to be updated?

It seems new svelte projects use the same new project commands. I was fairly sure I selected svelte (without kit) during creation - because I’d heard it isn’t amazing.

Basically the GitHub project is the latest code and the other delete.html isn’t updated as I haven’t worked out how to compile it statically without a web server yet. The second image is the GitHub version - with kind 10002 and extension relay loading options.

It looks like I can maybe use this adapter to output static site files? My previous attempts failed to find how to do it.

https://kit.svelte.dev/docs/adapter-static

To generate static files (SSG) with SvelteKit instead of SSR you can use the static adapter. https://github.com/sveltejs/kit/tree/master/packages/adapter-static

Thanks. I just got this working.

Do you know if there it a way to compile all the JavaScript output into a single file?

Popular tools include Webpack and Rollup for combining JavaScript files (with dependencies). Webpack is more for making websites, whereas Rollup is for making distributables for libraries.