Fixed #2903
This commit is contained in:
parent
c5101beae4
commit
cc0cb3c426
@ -1,20 +1,18 @@
|
|||||||
{% if site.wechat_qr %}
|
<!-- WeChat Modal -->
|
||||||
<!-- WeChat Modal -->
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var wechatModal = document.getElementById('WeChatMod');
|
var wechatModal = document.getElementById('WeChatMod');
|
||||||
var wechatBtn = document.querySelectorAll('[id="WeChatBtn"]');
|
var wechatBtn = document.querySelectorAll('[id="WeChatBtn"]');
|
||||||
|
|
||||||
for (var i = 0; i < wechatBtn.length; i++) {
|
for (var i = 0; i < wechatBtn.length; i++) {
|
||||||
wechatBtn[i].onclick = function () {
|
wechatBtn[i].onclick = function () {
|
||||||
wechatModal.style.display = 'block';
|
wechatModal.style.display = 'block';
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onclick = function (event) {
|
|
||||||
if (event.target == wechatModal) {
|
|
||||||
wechatModal.style.display = 'none';
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
}
|
||||||
{% endif %}
|
|
||||||
|
window.onclick = function (event) {
|
||||||
|
if (event.target == wechatModal) {
|
||||||
|
wechatModal.style.display = 'none';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user