Skip to content

Commit

Permalink
fix: 修复非文章页面时,加载多余的js
Browse files Browse the repository at this point in the history
  • Loading branch information
Lete114 committed Apr 23, 2022
1 parent b56e4b6 commit 6f2e37a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function tableWrap() {

// fancybox
function fancyboxFn() {
if(!$id('post')) return
getScript($config.CDN.fancyboxJs, function () {
const imgAll = $queryAll('.post-content img')
imgAll.forEach((ele) => ele.setAttribute('data-fancybox', ''))
Expand Down

0 comments on commit 6f2e37a

Please sign in to comment.