Skip to content
This repository has been archived by the owner on Jun 25, 2019. It is now read-only.

Commit

Permalink
优化格式
Browse files Browse the repository at this point in the history
  • Loading branch information
maicong committed Mar 5, 2018
1 parent 6a4fe60 commit 58d80ea
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions static/js/music.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ $(function() {
if (!v.title) v.title = '暂无';
if (!v.author) v.author = '暂无';
if (!v.pic) v.pic = nopic;
if (!v.lrc) v.lrc = '[00:00.00] 暂无歌词'
if (!v.lrc) v.lrc = '[00:00.00] 暂无歌词';
if (!/\[00:(\d{2})\./.test(v.lrc)) {
v.lrc = '[00:00.00] 无效歌词';
}
Expand All @@ -201,11 +201,8 @@ $(function() {
$('#j-lrc').val(data.lrc);
$('#j-lrc-btn').attr(
'href',
'data:application/octet-stream;base64,' + btoa(
unescape(
encodeURIComponent(data.lrc)
)
)
'data:application/octet-stream;base64,' +
btoa(unescape(encodeURIComponent(data.lrc)))
);
if ('download' in $('#j-src-btn')[0]) {
var name = data.title + '-' + data.author;
Expand Down Expand Up @@ -253,7 +250,7 @@ $(function() {
});
} else {
player.addMusic(result.data);
playerList = playerList.concat(result.data)
playerList = playerList.concat(result.data);
}

player.on('canplay', function() {
Expand All @@ -269,7 +266,8 @@ $(function() {
'url(' + nopic + ')'
);
};
document.title = '正在播放: ' + data.title + ' - ' + data.author;
document.title =
'正在播放: ' + data.title + ' - ' + data.author;
setValue(data);
});
player.on('ended', function() {
Expand Down

0 comments on commit 58d80ea

Please sign in to comment.