diff --git a/app/static/js/pages/eightPop.js b/app/static/js/pages/eightPop.js index f739b4e..8372bd4 100644 --- a/app/static/js/pages/eightPop.js +++ b/app/static/js/pages/eightPop.js @@ -47,11 +47,12 @@ } } - var confirmBtn = mask.querySelector("[data-eight-pop-confirm]"); + // 确认按钮和右下角关闭按钮(X)都视为确认年龄并进入网站。 + var confirmBtns = mask.querySelectorAll("[data-eight-pop-confirm]"); var exitBtns = mask.querySelectorAll("[data-eight-pop-exit]"); - if (confirmBtn) { - confirmBtn.addEventListener("click", confirmAge); - } + confirmBtns.forEach(function (button) { + button.addEventListener("click", confirmAge); + }); exitBtns.forEach(function (button) { button.addEventListener("click", exitSite); }); diff --git a/app/templates/base/eightPop.html b/app/templates/base/eightPop.html index 8962e94..afe0037 100644 --- a/app/templates/base/eightPop.html +++ b/app/templates/base/eightPop.html @@ -13,10 +13,10 @@ - - + {{end}}