Commit Graph

21 Commits

Author SHA1 Message Date
David Taylor
645b65adfa
FIX: Add playsinline to twitter GIFs 2020-08-18 00:26:51 +01:00
David Taylor
eb981b8fbb
FEATURE: Autoplay oneboxed twitter GIF media 2020-08-17 23:56:41 +01:00
David Taylor
a895e4a15b
FIX: Skip rendering twitter video if matching format not found
Followup to d5a4318a
2020-08-17 20:53:14 +01:00
David Taylor
d5a4318ac1
FIX: Replace iframe with <video> for twitter videos
This avoids the samesite cookie related error on chrome. It also adds support for twitter 'GIF' content, and allows videos to resize smoothly for narrow devices.
2020-08-17 20:37:36 +01:00
Sam Saffron
d0d5a138c3
DEV: stop freezing frozen strings
We have the `# frozen_string_literal: true` comment on all our
files. This means all string literals are frozen. There is no need
to call #freeze on any literals.

For files with `# frozen_string_literal: true`

```
puts %w{a b}[0].frozen?
=> true

puts "hi".frozen?
=> true

puts "a #{1} b".frozen?
=> true

puts ("a " + "b").frozen?
=> false

puts (-("a " + "b")).frozen?
=> true
```

For more details see: https://samsaffron.com/archive/2018/02/16/reducing-string-duplication-in-ruby
2020-04-30 16:48:53 +10:00
Martin Brennan
ce03092e61 Fix DiscourseCops/NoURIEscapeEncode errors and re-enable 2019-12-12 14:54:26 +10:00
Sam Saffron
30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Arpit Jalan
14a0879658 FIX: allow Twitter videos to go fullscreen 2018-07-19 10:22:36 +05:30
Arpit Jalan
a7ec949e02 make RuboCop happy 2018-07-17 13:15:44 +05:30
Arpit Jalan
7c7509e1bd FEATURE: update TwitterApi for prettifying like/retweet count 2018-07-17 12:59:40 +05:30
Arpit Jalan
2a9b4e4bb5 FIX: do not replace hashtags in URLs 2018-05-17 00:34:17 +05:30
Arpit Jalan
6cd0b7316a FIX: do not replace twitter handles in URLs 2018-05-17 00:20:11 +05:30
Arpit Jalan
17584bca5e UX: wrap full-size Twitter onebox images in aspect-ratio 2018-03-23 18:25:04 +05:30
Guo Xiang Tan
5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Arpit Jalan
c47658c7c5 FIX: first @mention/#hashtag is not a hyperlink in Twitter onebox
https://meta.discourse.org/t/first-mention-is-not-a-hyperlink-in-twitter-onebox/65665
2017-07-07 21:50:15 +05:30
David Taylor
89d41ecb39 Add support for oneboxing twitter videos 2017-03-17 20:49:29 +00:00
David Taylor
ea45cc1293 Request full tweets, since twitter has increased the allowed length 2017-03-17 20:36:53 +00:00
Robin Ward
c06a6a96cc
FEATURE: Embed images in tweets with dimensions, if present 2016-05-11 16:11:26 -04:00
Neil Lalonde
946e837542 Add twitter to Onebox.options 2014-01-29 14:14:07 -05:00
Sam
a80d3aa634 no need for this dependency 2013-10-11 12:24:34 +11:00
Sam
172a85ae14 prettier twitter links, extracted mini api 2013-10-11 11:46:35 +11:00