From 58d80ea8aff74400c325fd2f3dee3e9ba9515b20 Mon Sep 17 00:00:00 2001 From: MaiCong Date: Mon, 5 Mar 2018 15:37:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/music.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/static/js/music.js b/static/js/music.js index 4976e6c..1215081 100644 --- a/static/js/music.js +++ b/static/js/music.js @@ -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] 无效歌词'; } @@ -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; @@ -253,7 +250,7 @@ $(function() { }); } else { player.addMusic(result.data); - playerList = playerList.concat(result.data) + playerList = playerList.concat(result.data); } player.on('canplay', function() { @@ -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() {