Mercurial > pumpbridge
comparison src/twitter.coffee @ 24:08d9679da0f7
s/wrotes/writes/
author | Mathias Gebbe <mgebbe@intevation.de> |
---|---|
date | Thu, 19 Jun 2014 13:01:11 +0200 |
parents | 8c56fdbac0fb |
children | f27ddfa42e94 |
comparison
equal
deleted
inserted
replaced
23:8c56fdbac0fb | 24:08d9679da0f7 |
---|---|
126 status = "" | 126 status = "" |
127 text = post.object.content.replace(/<(?:.|\n)*?>/gm, '') | 127 text = post.object.content.replace(/<(?:.|\n)*?>/gm, '') |
128 re = new RegExp(String.fromCharCode(160), "g") | 128 re = new RegExp(String.fromCharCode(160), "g") |
129 text = text.replace(re, " ") | 129 text = text.replace(re, " ") |
130 if post.verb is "share" | 130 if post.verb is "share" |
131 status = post.object.author.url + " wrotes: " | 131 status = post.object.author.url + " writes: " |
132 if text.length <= 140 | 132 if text.length <= 140 |
133 status += text | 133 status += text |
134 else | 134 else |
135 status += text.substr(0, 140 - (post.object.url.length + 2)) + ".." + post.object.url | 135 status += text.substr(0, 140 - (post.object.url.length + 2)) + ".." + post.object.url |
136 twit.verifyCredentials((data) -> | 136 twit.verifyCredentials((data) -> |