cosmetic improvement to reddit embed
parent
aced39943b
commit
4f65791d3b
|
@ -7824,3 +7824,8 @@ table.border-0 * {
|
|||
img[src$="/e/speechbubble.webp"] {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
#reddit-embed {
|
||||
border: none;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
|
|
@ -3,8 +3,6 @@ addEventListener("message", function(t) {
|
|||
const data = JSON.parse(t.data)
|
||||
let height = data.data
|
||||
if (data && "type" in data && data.type == "resize.embed")
|
||||
if (screen_width < 768)
|
||||
height += 40
|
||||
document.getElementById('reddit-embed').height = height
|
||||
}
|
||||
})
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% if p.url and p.url.startswith('https://old.reddit.com/r/') %}
|
||||
<iframe id="reddit-embed" class="border-0" src="{{p.url.replace('https://old.reddit.com/', 'https://embed.reddit.com/').split('?')[0]}}?context=1&showtitle=true{% if v.theme in DARK_THEMES %}&theme=dark{% endif %}" height="317px" width="100%"></iframe>
|
||||
<iframe id="reddit-embed" src="{{p.url.replace('https://old.reddit.com/', 'https://embed.reddit.com/').split('?')[0]}}?context=1&showtitle=true{% if v.theme in DARK_THEMES %}&theme=dark{% endif %}" height="317px" width="100%"></iframe>
|
||||
<script defer src="{{'js/reddit_embed.js' | asset}}"></script>
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue