Merge branch 'master' of github.com:zixaphir/appchan-x

This commit is contained in:
Zixaphir 2013-11-23 13:04:23 -07:00
commit 4abb226e53

View File

@ -404,8 +404,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