Skip to content

Commit

Permalink
Fixed #2903
Browse files Browse the repository at this point in the history
  • Loading branch information
george-gca authored Dec 19, 2024
1 parent c5101be commit cc0cb3c
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions _includes/scripts/wechatModal.liquid
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
{% if site.wechat_qr %}
<!-- WeChat Modal -->
<!-- WeChat Modal -->

<script>
var wechatModal = document.getElementById('WeChatMod');
var wechatBtn = document.querySelectorAll('[id="WeChatBtn"]');
<script>
var wechatModal = document.getElementById('WeChatMod');
var wechatBtn = document.querySelectorAll('[id="WeChatBtn"]');
for (var i = 0; i < wechatBtn.length; i++) {
wechatBtn[i].onclick = function () {
wechatModal.style.display = 'block';
};
}
window.onclick = function (event) {
if (event.target == wechatModal) {
wechatModal.style.display = 'none';
}
for (var i = 0; i < wechatBtn.length; i++) {
wechatBtn[i].onclick = function () {
wechatModal.style.display = 'block';
};
</script>
{% endif %}
}
window.onclick = function (event) {
if (event.target == wechatModal) {
wechatModal.style.display = 'none';
}
};
</script>

0 comments on commit cc0cb3c

Please sign in to comment.