mirror of
https://gitee.com/huanghongxun/HMCL-docs.git
synced 2026-09-15 08:31:11 +08:00
修复部分页面重定向可能失效的问题 (#285)
This commit is contained in:
@@ -40,7 +40,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
position: relative;
|
||||
`;
|
||||
|
||||
let timeLeft = 10 ; // 倒计时秒数
|
||||
let timeLeft = 10 ; /* 倒计时秒数 */
|
||||
const closeButton = document.createElement('button');
|
||||
closeButton.textContent = '我已了解';
|
||||
closeButton.style.cssText = `
|
||||
@@ -80,7 +80,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
modal.appendChild(modalContent);
|
||||
document.body.appendChild(modal);
|
||||
|
||||
// 倒计时功能
|
||||
/* 倒计时功能 */
|
||||
const countdownInterval = setInterval(() => {
|
||||
timeLeft--;
|
||||
document.getElementById('countdown').textContent = timeLeft;
|
||||
@@ -93,7 +93,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
// 添加关闭按钮事件
|
||||
/* 添加关闭按钮事件 */
|
||||
closeButton.addEventListener('click', () => {
|
||||
if (!closeButton.disabled) {
|
||||
document.body.removeChild(modal);
|
||||
|
||||
Reference in New Issue
Block a user