1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-06-02 06:46:50 +02:00

fix youtube embedding

This commit is contained in:
muflax 2013-03-28 15:19:02 +01:00
parent b98b9f6a5b
commit 235af9ae12

View file

@ -23,9 +23,10 @@ def image(name, title="", link=nil)
end end
def youtube(url) def youtube(url)
embed_url = url.gsub("watch?v=", "embed/")
<<EOL <<EOL
<div align="center"> <div align="center">
<iframe width="560" height="315" src="#{url}" frameborder="0" allowfullscreen> <iframe width="560" height="315" src="#{embed_url}" frameborder="0" allowfullscreen>
</iframe> </iframe>
<a href="#{url}">(watch on Youtube)</a> <a href="#{url}">(watch on Youtube)</a>
</div> </div>