Skip to content

Commit cc0cb3c

Browse files
authored
Fixed #2903
1 parent c5101be commit cc0cb3c

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

_includes/scripts/wechatModal.liquid

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
{% if site.wechat_qr %}
2-
<!-- WeChat Modal -->
1+
<!-- WeChat Modal -->
32

4-
<script>
5-
var wechatModal = document.getElementById('WeChatMod');
6-
var wechatBtn = document.querySelectorAll('[id="WeChatBtn"]');
3+
<script>
4+
var wechatModal = document.getElementById('WeChatMod');
5+
var wechatBtn = document.querySelectorAll('[id="WeChatBtn"]');
76
8-
for (var i = 0; i < wechatBtn.length; i++) {
9-
wechatBtn[i].onclick = function () {
10-
wechatModal.style.display = 'block';
11-
};
12-
}
13-
14-
window.onclick = function (event) {
15-
if (event.target == wechatModal) {
16-
wechatModal.style.display = 'none';
17-
}
7+
for (var i = 0; i < wechatBtn.length; i++) {
8+
wechatBtn[i].onclick = function () {
9+
wechatModal.style.display = 'block';
1810
};
19-
</script>
20-
{% endif %}
11+
}
12+
13+
window.onclick = function (event) {
14+
if (event.target == wechatModal) {
15+
wechatModal.style.display = 'none';
16+
}
17+
};
18+
</script>

0 commit comments

Comments
 (0)