mirror of
https://github.com/Ad-closeNN/blog-fuwari.git
synced 2026-05-31 01:20:06 -04:00
docs(pages): 为 Astro 加上在新标签页打开链接的功能
2. del(music): 删除音乐:在银河中孤独摇摆 3. fix(config): 简单修复即使 background 为关闭时依然加载背景图片的问题 4. chore(friends): 加入新的友链 5. style(friends): 优化友情链接页面的样式 6. style(footer): 修改 footer 页脚文本 7. fix(css): 修复复制按钮无法显示的问题
This commit is contained in:
@@ -63,49 +63,10 @@ const config = profileConfig;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 星期日等 -->
|
||||
<div id="sunday-music"></div>
|
||||
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=250 height=86 src="//music.163.com/outchain/player?type=2&id=411500345&auto=0&height=66"></iframe>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 音乐 -->
|
||||
<script>
|
||||
(function () {
|
||||
const sundayMusicElement = document.getElementById('sunday-music');
|
||||
// 检查是否已经存在播放器
|
||||
if (sundayMusicElement && sundayMusicElement.querySelector('iframe')) {
|
||||
return; // 如果已经存在播放器,则不再添加
|
||||
}
|
||||
const isSunday = new Date().getDay() === 0;
|
||||
if (!isSunday){
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.setAttribute('frameborder', '0');
|
||||
iframe.setAttribute('marginwidth', '0');
|
||||
iframe.setAttribute('marginheight', '0');
|
||||
iframe.width = '250';
|
||||
iframe.height = '86';
|
||||
iframe.src = 'https://music.163.com/outchain/player?type=2&id=411500345&auto=1&height=66';
|
||||
const sundayMusicElement = document.getElementById('sunday-music');
|
||||
if (sundayMusicElement) {
|
||||
sundayMusicElement.appendChild(iframe);
|
||||
}
|
||||
}
|
||||
else{
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.setAttribute('frameborder', '0');
|
||||
iframe.setAttribute('marginwidth', '0');
|
||||
iframe.setAttribute('marginheight', '0');
|
||||
iframe.width = '250';
|
||||
iframe.height = '86';
|
||||
iframe.src = 'https://music.163.com/outchain/player?type=2&id=2155423467&auto=0&height=66';
|
||||
|
||||
const sundayMusicElement = document.getElementById('sunday-music');
|
||||
if (sundayMusicElement) {
|
||||
sundayMusicElement.appendChild(iframe);
|
||||
}
|
||||
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user