新增嵌入式代码块;优化通知书推送时机

This commit is contained in:
anian
2026-03-10 17:24:50 +08:00
parent 6810791637
commit b387ea885c
24 changed files with 3793 additions and 294 deletions
+25 -25
View File
@@ -1,29 +1,29 @@
// 接管手机端底部音乐按钮
function modify_m_bottom_music_button_link() {
const music = document.querySelector('a[href*="#m_bottom_music_button"]');
if (!music) return;
music.addEventListener('click', function(event) {
event.preventDefault();
mu_box_show();
});
}
// 视频默认正方形,播放恢复比例
function modify_moment_video_size() {
const videos = document.querySelectorAll('.pix_video');
videos.forEach(video => {
if (!video.hasAttribute('data-video-events-bound')) {
video.addEventListener('play', () => {
video.classList.add('is-playing');
});
video.addEventListener('ended', () => {
video.classList.remove('is-playing');
});
video.setAttribute('data-video-events-bound', 'true');
}
const music = document.querySelector('a[href*="#m_bottom_music_button"]');
if (!music) return;
music.addEventListener('click', function (event) {
event.preventDefault();
mu_box_show();
});
}
// 视频默认正方形,播放恢复比例(接入灯箱后已无用)
// function modify_moment_video_size() {
// const videos = document.querySelectorAll('.pix_video');
// videos.forEach(video => {
// if (!video.hasAttribute('data-video-events-bound')) {
// video.addEventListener('play', () => {
// video.classList.add('is-playing');
// });
// video.addEventListener('ended', () => {
// video.classList.remove('is-playing');
// });
// video.setAttribute('data-video-events-bound', 'true');
// }
// });
// }
@@ -46,18 +46,18 @@ function modify_moment_video_size() {
// 集合:PJAX(初始化执行+PJAX执行)
function init_anian_pjax() {
modify_moment_video_size();
// modify_moment_video_size();
}
// 集合:初始化(仅初始化执行一次)
function init_anian_inport() {
init_anian_pjax();
modify_m_bottom_music_button_link();
init_anian_pjax();
modify_m_bottom_music_button_link();
}
// PJAX监听
document.addEventListener('pjax:complete', function () {
init_anian_pjax();
init_anian_pjax();
})
// 入口
+324 -257
View File
File diff suppressed because it is too large Load Diff