embed direct video links

This commit is contained in:
ccd0 2014-03-25 00:50:41 -07:00
parent 42069ff693
commit 4f260137f1
6 changed files with 87 additions and 35 deletions

View File

@ -1,5 +1,5 @@
/*
* 4chan X - Version 1.4.1 - 2014-03-24
* 4chan X - Version 1.4.1 - 2014-03-25
*
* Licensed under the MIT license.
* https://github.com/Spittie/4chan-x/blob/master/LICENSE

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1260,6 +1260,10 @@ div.boardTitle {
background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/installgentoo.png", {encoding: "base64"}) %>') center left no-repeat!important;
padding-left: 18px;
}
.linkify.video {
background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/video.png", {encoding: "base64"}) %>') center left no-repeat!important;
padding-left: 18px;
}
/* Gallery */
#a-gallery {

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

View File

@ -433,5 +433,13 @@ Linkify =
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
,
key: 'video'
regExp: /(.*\.(ogv|webm|mp4))$/
el: (a) ->
$.el 'video',
controls: 'controls'
preload: 'auto'
src: a.dataset.uid
]