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