fix 底栏歌词显示 & 去除百度统计
This commit is contained in:
parent
9b0a355ae1
commit
f9cc6c73eb
@ -627,9 +627,11 @@ footer {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.lrc-show {
|
||||
/*播放音乐时底栏歌词*/
|
||||
font-size: 1.10rem;
|
||||
#lrc {
|
||||
display: none;
|
||||
line-height: 46px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/*弹窗样式*/
|
||||
|
14
index.html
14
index.html
@ -36,16 +36,6 @@
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/aplayer/1.10.1/APlayer.min.js" crossorigin="anonymous"
|
||||
referrerpolicy="no-referrer"></script>
|
||||
<!-- 百度统计 -->
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?14e9f35ff8bc67fd4bcb5f07a6e6655a";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
<!-- IE Out -->
|
||||
<script>
|
||||
if ( /*@cc_on!@*/ false || (!!window.MSInputMethodContext && !!document.documentMode)) window.location.href =
|
||||
@ -373,13 +363,15 @@
|
||||
</main>
|
||||
<!-- 版权信息 -->
|
||||
<footer id="footer" class="fixed-bottom footer">
|
||||
<div class="power" id="lrc">Copyright © 2020
|
||||
<div class="power">Copyright © 2020
|
||||
<script>
|
||||
document.write(' - ' + (new Date()).getFullYear())
|
||||
</script> <a href="https://imsyy.top">無名</a> &
|
||||
<!-- 以下信息请不要修改哦 -->
|
||||
Made by <a href="https://github.com/imsyy/home" target="_blank">imsyy</a>
|
||||
</div>
|
||||
<!-- 歌词显示 -->
|
||||
<div id="lrc"></div>
|
||||
</footer>
|
||||
</section>
|
||||
<!-- JS -->
|
||||
|
16
js/music.js
16
js/music.js
@ -410,6 +410,11 @@ const ap = new APlayer({
|
||||
]
|
||||
});
|
||||
|
||||
/* 底栏歌词 */
|
||||
setInterval(function () {
|
||||
$("#lrc").html("<span class='lrc-show'><i class='iconfont icon-music'></i> " + $(".aplayer-lrc-current").text() + " <i class='iconfont icon-music'></i></span>");
|
||||
}, 500);
|
||||
|
||||
/* 音乐通知及控制 */
|
||||
ap.on('play', function () {
|
||||
music = $(".aplayer-title").text() + $(".aplayer-author").text();
|
||||
@ -422,16 +427,17 @@ ap.on('play', function () {
|
||||
$("#play").html("<i class='iconfont icon-pause'>");
|
||||
$("#music-name").html($(".aplayer-title").text() + $(".aplayer-author").text());
|
||||
if ($(document).width() >= 990) {
|
||||
window.lrc = setInterval(function () {
|
||||
$("#lrc").html("<span class='lrc-show'><i class='iconfont icon-music'></i> " + $(".aplayer-lrc-current").text() + " <i class='iconfont icon-music'></i></span>");
|
||||
}, 500);
|
||||
$('.power').css("cssText", "display:none");
|
||||
$('#lrc').css("cssText", "display:block !important");
|
||||
}
|
||||
});
|
||||
|
||||
ap.on('pause', function () {
|
||||
$("#play").html("<i class='iconfont icon-play'>");
|
||||
clearInterval(window.lrc);
|
||||
$("#lrc").html("Copyright © 2020-2022 <a href='https://imsyy.top'>無名</a> & Made by <a href='https://github.com/imsyy/home' target='_blank'>imsyy</a>");
|
||||
if ($(document).width() >= 990) {
|
||||
$('#lrc').css("cssText", "display:none !important");
|
||||
$('.power').css("cssText", "display:block");
|
||||
}
|
||||
});
|
||||
|
||||
/* 一言与音乐切换 */
|
||||
|
12
vercel.json
12
vercel.json
@ -1,8 +1,12 @@
|
||||
{
|
||||
"version": 2,
|
||||
"routes": [
|
||||
{ "handle": "filesystem" },
|
||||
{ "src": "/(.*)", "status": 404, "dest": "/" }
|
||||
"routes": [{
|
||||
"handle": "filesystem"
|
||||
},
|
||||
{
|
||||
"src": "/(.*)",
|
||||
"status": 404,
|
||||
"dest": "/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user