intorust / intorust.com

Learn Rust real good.
Other
304 stars 25 forks source link

Client side play urls #10

Closed ests closed 6 years ago

ests commented 7 years ago

Assembly links to Play Rust out of source files fetched from the server. This is done just after DOM has loaded - every link with special data attribute will have its href replaced.

The other solution was to use various onclick events, but opening windows via javascript will almost always trigger popup blocking.

See #3 .

nikomatsakis commented 7 years ago

This looks pretty good! I left a few comments.

nikomatsakis commented 7 years ago

Argh, this fell off my radar. I admit I don't feel qualified to know if this is really The Right Way to go about things, but this seems like a good approach to me.

@ests did you delete the original repo? I was going to poke about and try it locally, but I can't seem to figure out where to merge from.

ests commented 7 years ago

@nikomatsakis I was sure this won't be accepted so I was too quick to delete it - sorry. I also don't have it on my laptop. I don't know if this is (was) the right way to go. But now probably the only way to play with it, would be to somehow to generate diff file on github and apply it locally, but I don't know if this is possible (easily).

nikomatsakis commented 7 years ago

@ests good thinking. https://patch-diff.githubusercontent.com/raw/nikomatsakis/intorust/pull/10.diff seems to work.

nikomatsakis commented 7 years ago

Argh, I've let this sit for way too long! I'm inclined to merge it at this point =) Do these kinds of URLs still work?