diff --git a/css/style.css b/css/style.css index 0236ca0..0d3ef6a 100644 --- a/css/style.css +++ b/css/style.css @@ -627,9 +627,11 @@ footer { opacity: 0.8; } -.lrc-show { - /*播放音乐时底栏歌词*/ - font-size: 1.10rem; +/*播放音乐时底栏歌词*/ +#lrc { + display: none; + line-height: 46px; + opacity: 0.8; } /*弹窗样式*/ diff --git a/index.html b/index.html index 23f9f8d..4006ce0 100644 --- a/index.html +++ b/index.html @@ -36,16 +36,6 @@ crossorigin="anonymous" referrerpolicy="no-referrer" /> - - 無名 & Made by imsyy + +
diff --git a/js/music.js b/js/music.js index d7edff2..aa82362 100644 --- a/js/music.js +++ b/js/music.js @@ -410,6 +410,11 @@ const ap = new APlayer({ ] }); +/* 底栏歌词 */ +setInterval(function () { + $("#lrc").html(" " + $(".aplayer-lrc-current").text() + " "); +}, 500); + /* 音乐通知及控制 */ ap.on('play', function () { music = $(".aplayer-title").text() + $(".aplayer-author").text(); @@ -422,16 +427,17 @@ ap.on('play', function () { $("#play").html(""); $("#music-name").html($(".aplayer-title").text() + $(".aplayer-author").text()); if ($(document).width() >= 990) { - window.lrc = setInterval(function () { - $("#lrc").html(" " + $(".aplayer-lrc-current").text() + " "); - }, 500); + $('.power').css("cssText", "display:none"); + $('#lrc').css("cssText", "display:block !important"); } }); ap.on('pause', function () { $("#play").html(""); - clearInterval(window.lrc); - $("#lrc").html("Copyright © 2020-2022 無名 & Made by imsyy"); + if ($(document).width() >= 990) { + $('#lrc').css("cssText", "display:none !important"); + $('.power').css("cssText", "display:block"); + } }); /* 一言与音乐切换 */ diff --git a/vercel.json b/vercel.json index d626d20..a049acb 100644 --- a/vercel.json +++ b/vercel.json @@ -1,8 +1,12 @@ { - "version": 2, - "routes": [ - { "handle": "filesystem" }, - { "src": "/(.*)", "status": 404, "dest": "/" } - ] - } - \ No newline at end of file + "version": 2, + "routes": [{ + "handle": "filesystem" + }, + { + "src": "/(.*)", + "status": 404, + "dest": "/" + } + ] +} \ No newline at end of file