mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Improve support for old browsers (#9515)
* FEATURE: Improve crawler view
* FIX: Make lazyYT crawler-friendly
* DEV: Rename discourse-internet-explorer to discourse-unsupported-browser
* DEV: Detect more unsupported browsers
Follow-up to 4eebbd2212
.
* FIX: Hide browser update notice in print view
This commit is contained in:
parent
402194f313
commit
c85018cdfd
22 changed files with 151 additions and 114 deletions
|
@ -27,7 +27,19 @@ class Onebox::Engine::YoutubeOnebox
|
|||
|
||||
# Put in the LazyYT div instead of the iframe
|
||||
escaped_title = ERB::Util.html_escape(video_title)
|
||||
"<div class=\"lazyYT\" data-youtube-id=\"#{video_id}\" data-youtube-title=\"#{escaped_title}\" data-width=\"#{video_width}\" data-height=\"#{video_height}\" data-parameters=\"#{embed_params}\"></div>"
|
||||
|
||||
<<~EOF
|
||||
<div class="lazyYT"
|
||||
data-youtube-id="#{video_id}"
|
||||
data-youtube-title="#{escaped_title}"
|
||||
data-width="#{video_width}"
|
||||
data-height="#{video_height}"
|
||||
data-parameters="#{embed_params}">
|
||||
<a href="https://www.youtube.com/watch?v=#{video_id}" target="_blank">
|
||||
<img src="https://img.youtube.com/vi/#{video_id}/hqdefault.jpg" width="#{video_width}" height="#{video_height}" title="#{escaped_title}">
|
||||
</a>
|
||||
</div>
|
||||
EOF
|
||||
else
|
||||
yt_onebox_to_html
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue