From 1e2a7c17c739c73d71a29825e78d5ef23d01060a Mon Sep 17 00:00:00 2001 From: mahkoh <=> Date: Thu, 24 Oct 2013 18:19:50 +0200 Subject: [PATCH] add allowfullscreen to youtube embed --- src/Linkification/Linkify.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index e724ff1b8..9ec63b88f 100755 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -397,8 +397,10 @@ Linkify = YouTube: regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/ el: (a) -> - $.el 'iframe', + ret = $.el 'iframe', src: "//www.youtube.com/embed/#{a.dataset.uid}#{if a.dataset.option then '#' + a.dataset.option else ''}?wmode=opaque" + ret.setAttribute "allowfullscreen", "true" + ret title: api: (uid) -> "https://gdata.youtube.com/feeds/api/videos/#{uid}?alt=json&fields=title/text(),yt:noembed,app:control/yt:state/@reasonCode" text: (data) -> data.entry.title.$t