zelark / nano-id-cc

Nano ID collision calculator
https://zelark.github.io/nano-id-cc/
MIT License
45 stars 10 forks source link

Add copy to clipboard functionality #19

Closed ghost closed 5 years ago

ghost commented 5 years ago

closes #4

zelark commented 5 years ago

@korlando7 thanks for the PR. I glad to see you want to help. However, there are few remarks. 1) It doesn't work properly in Chrome (I used the latest version). I click to the button, but nothing happens. In Firefox it works perfect. 2) After copying the selection remains.

You can use https://clipboardjs.com/ as an example of how I'd like it works. Tooltip is not needed for now, but I expect the same mechanics.

ghost commented 5 years ago

@zelark thanks for the constructive feedback, I will check out your requests and address them soon.

ghost commented 5 years ago

@zelark let me know if this is working for you now. I tested in both Chrome and Firefox and was successfully able to add the code to the clipboard.

ghost commented 5 years ago

@zelark sounds good.

Thanks for cleaning up the code and removing the thread operator, I should have done that earlier. Also, I didn't see a linter in the project.clj, let me know if I missed it. I usually use cljfmt

zelark commented 5 years ago

I use clj-kondo as a linter. It doesn't require any config in project.clj.

zelark commented 5 years ago

Just deployed https://zelark.github.io/nano-id-cc/.

ghost commented 5 years ago

clj-kondo looks awesome, thanks for sharing