Fixed #2903
This commit is contained in:
parent
c5101beae4
commit
cc0cb3c426
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user