Fix Windows tweet schrinking phenomenon (#19686)
This commit is contained in:
parent
c7bb3be603
commit
f88e18c2de
2 changed files with 2 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ class TweetTag < LiquidTagBase
|
|||
if (data && data['method'] === 'twttr.private.resize' && data['params'] && data['params']['0']) {
|
||||
iframe.style.height = data['params']['0']['height'] + 0.5 + 'px';
|
||||
iframe.style.minHeight = data['params']['0']['height'] + 0.5 + 'px';
|
||||
iframe.style.width = data['params']['0']['width'] + 'px';
|
||||
iframe.style.width = data['params']['0']['width'] + 'px !important';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<% obj_id = "#{id}-#{rand(1_000)}" %>
|
||||
<iframe
|
||||
class="tweet-embed"
|
||||
scrolling="no"
|
||||
id="tweet-<%= obj_id %>"
|
||||
src="https://platform.twitter.com/embed/Tweet.html?id=<%= id %>">
|
||||
</iframe>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue