Skip to content

Commit

Permalink
Merge pull request #434 from Qiu-Quanzhi/patch-2
Browse files Browse the repository at this point in the history
fix(layout/includes/widgets/post/copyright.pug): 调整分享二维码容错率
  • Loading branch information
everfu authored Dec 17, 2024
2 parents 1b02595 + d690336 commit b957cb6
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 b957cb6

Please sign in to comment.