script/bitlove-enclosures.js: cosmetics
This commit is contained in:
parent
adf771da53
commit
388a051df3
|
@ -84,7 +84,7 @@ $(document).ready(function() {
|
||||||
/* For C3D2-Web */
|
/* For C3D2-Web */
|
||||||
$('a[rel="enclosure"]').each(function() {
|
$('a[rel="enclosure"]').each(function() {
|
||||||
var a = $(this);
|
var a = $(this);
|
||||||
var prevLi = a.parent();
|
var li = a.parent();
|
||||||
var url = a.attr('href');
|
var url = a.attr('href');
|
||||||
|
|
||||||
if (/\.torrent$/.test(url))
|
if (/\.torrent$/.test(url))
|
||||||
|
@ -93,9 +93,10 @@ $(document).ready(function() {
|
||||||
resolve(url, function(info) {
|
resolve(url, function(info) {
|
||||||
var torrent = info && info.sources && info.sources[0] && info.sources[0].torrent;
|
var torrent = info && info.sources && info.sources[0] && info.sources[0].torrent;
|
||||||
if (info && torrent) {
|
if (info && torrent) {
|
||||||
var li = $('<li><a type="application/x-bittorrent" class="mime">Torrent</a>');
|
var a = $('<a type="application/x-bittorrent" class="torrent mime">Torrent</a>');
|
||||||
li.find('a').attr('href', torrent);
|
a.attr('href', torrent);
|
||||||
prevLi.after(li);
|
li.append(" ");
|
||||||
|
li.append(a);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -781,6 +781,10 @@ li audio, li video, li .poster {
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
.video-resource .torrent {
|
||||||
|
margin-left: 0.4em;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
.chapters {
|
.chapters {
|
||||||
margin: 0.5em auto;
|
margin: 0.5em auto;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user