|
16 | 16 | let checkComment = false; |
17 | 17 | if (theme.plugins.busuanzi.enable |
18 | 18 | || (theme.comments.service=='waline' && theme.comments.waline.pageview) |
19 | | - || theme.comments.service=='twikoo' |
20 | | - || theme.comments.service=='discuss' |
21 | | - || theme.comments.service=='artalk') { |
| 19 | + || (theme.comments.service=='twikoo' && theme.comments.twikoo.visitor) |
| 20 | + || (theme.comments.service=='discuss' && theme.comments.discuss.visitStat) |
| 21 | + || (theme.comments.service=='artalk' && theme.comments.artalk.visitor)) { |
22 | 22 | checkComment = !checkComment; |
23 | 23 | } |
24 | 24 | %> |
|
28 | 28 | <a class='notlink'> |
29 | 29 | <p> |
30 | 30 | <i class="<%- theme.article.body.meta_library.counter.icon %> fa-fw" aria-hidden="true"></i> |
31 | | - <% if (theme.plugins.busuanzi.enable) { %> |
32 | | - <span id="busuanzi_value_page_pv"><i class="fa-solid fa-loader fa-spin fa-fw" aria-hidden="true"></i></span> |
33 | | - <% } else if (theme.comments.service=='waline' && theme.comments.waline.pageview) { %> |
| 31 | + <% if (theme.comments.service=='waline' && theme.comments.waline.pageview) { %> |
34 | 32 | <span data-path="<%- url_for(path) %>" class="waline-pageview-count"> |
35 | 33 | <i class="fa-solid fa-loader fa-spin fa-fw" aria-hidden="true"></i> |
36 | 34 | </span> |
37 | | - <% } else if (theme.comments.service=='twikoo') { %> |
| 35 | + <% } else if (theme.comments.service=='twikoo' && theme.comments.twikoo.visitor) { %> |
38 | 36 | <span id="twikoo_visitors"> |
39 | 37 | <i class="fa-solid fa-loader fa-spin fa-fw" aria-hidden="true"></i> |
40 | 38 | </span> |
41 | | - <% } else if (theme.comments.service=='discuss') { %> |
| 39 | + <% } else if (theme.comments.service=='discuss' && theme.comments.discuss.visitStat) { %> |
42 | 40 | <span id="Discuss-Visitors"> |
43 | 41 | <i class="fa-solid fa-loader fa-spin fa-fw" aria-hidden="true"></i> |
44 | 42 | </span> |
45 | | - <% } else if (theme.comments.service=='artalk') { %> |
| 43 | + <% } else if (theme.comments.service=='artalk' && theme.comments.artalk.visitor) { %> |
46 | 44 | <span id="artalk_visitors" data-page-key="<%- url_for(path) %>"> |
47 | 45 | <i class="fa-light fa-loader fa-spin fa-fw" aria-hidden="true"></i> |
48 | 46 | </span> |
49 | | - <% } %> |
| 47 | + <% } else if (theme.plugins.busuanzi.enable) { %> |
| 48 | + <span id="busuanzi_value_page_pv"> |
| 49 | + <i class="fa-solid fa-loader fa-spin fa-fw" aria-hidden="true"></i> |
| 50 | + </span> |
| 51 | + <% } %> |
50 | 52 | <span><%- theme.article.body.meta_library.counter.unit %></span> |
51 | 53 | </p> |
52 | 54 | </a> |
|
0 commit comments