Fix/giphy search #53

Merged
merged 6 commits into from Dec 23, 2016

Conversation

2 participants
Owner

CrazyLemon commented Dec 19, 2016

Pls merge this and ignore the mess with commits... ktnx

Owner

CrazyLemon commented Dec 22, 2016

@zdobersek ping

Contributor

zdobersek commented Dec 23, 2016

hai

scripts/chatter.coffee
- if count[0] > 0
- gif_id = $(".hoverable-gif a").eq(0).attr("data-id")
- r.reply "http://media.giphy.com/media/#{gif_id}/giphy.gif"
+ url = "http://api.giphy.com/v1/gifs/search?q=#{encodeURI(match[1].replace(/[^a-z0-9\s]/g,"").replace(/\s\s+/g, "+"))}&api_key=dc6zaTOxFJmzC"
@zdobersek

zdobersek Dec 23, 2016

Contributor

/^[a-z0-9\s]/g ?

@zdobersek

zdobersek Dec 23, 2016

Contributor

/[^a-zA-Z0-9\s/g ?

Contributor

zdobersek commented Dec 23, 2016

This is still wrong, but because it's you, I'll allow it.

@zdobersek zdobersek merged commit 97914ae into master Dec 23, 2016

@dz0ny dz0ny deleted the fix/giphy-search branch Jan 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment