关闭按钮逻辑修改
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
<button class="eight-pop-btn eight-pop-btn--exit" type="button" data-eight-pop-exit>我未满18岁-退出</button>
|
||||
</div>
|
||||
</div>
|
||||
<button class="eight-pop-close" type="button" data-eight-pop-exit aria-label="关闭并退出访问">
|
||||
<button class="eight-pop-close" type="button" data-eight-pop-confirm aria-label="关闭并进入网站">
|
||||
<img src="/static/images/figma-age/close.svg" width="36" height="36" alt="" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/js/pages/eightPop.js?v=4"></script>
|
||||
<script src="/static/js/pages/eightPop.js?v=5"></script>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user