Skip to content

Commit

Permalink
fix(layout/includes/widgets/post/copyright.pug): 调整分享二维码容错率
Browse files Browse the repository at this point in the history
Signed-off-by: 旅禾Tristan <i@qqzhi.cc>
  • Loading branch information
Qiu-Quanzhi authored Dec 17, 2024
1 parent 47432a5 commit d690336
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions layout/includes/widgets/post/copyright.pug
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@
#qrcode
.reward-dec=_p('post.share.qrcode')
script(pjax).
typeof QRCode === 'function' && new QRCode(document.getElementById("qrcode"), '!{path}');
typeof QRCode === 'function' && new QRCode(document.getElementById("qrcode"), {
text: '!{path}',
correctLevel : QRCode.CorrectLevel.L
});
window.addEventListener('DOMContentLoaded', () => {
new QRCode(document.getElementById("qrcode"), '!{path}');
new QRCode(document.getElementById("qrcode"), {
text: '!{path}',
correctLevel : QRCode.CorrectLevel.L
});
});

if copyright.enable || page.copyright
Expand Down

0 comments on commit d690336

Please sign in to comment.