I DON'T KNOW, CAN YOU?? jk, yes you may. Edit jokes.json
to add a new joke (you can do it right from GitHub without even downloading the repo) and open a PR, I'd be happy to merge it
- I wanted people to be able to link to specific jokes
- I didn't want the hashes to be incredibly long (base64 or plain text)
- I didn't want contributors to have to add a unique ID as part of their PRs
So it uses browser-native crypto libraries to hash the joke text and truncates the result into a short, very likely unique, slug
What happens if the hashes aren't unique? It will pick the first match from the top of the jokes.json file.
Everything is funnier with a GIF. Fight me.
$50. Wasn't even parked! I know, I couldn't believe it either!
HI 'NOT AMUSED', I'M DAD