minivaline v5

This commit is contained in:
MHuiG
2020-12-25 10:04:38 +08:00
parent 106f2494eb
commit 948cb65243
2 changed files with 10 additions and 58 deletions

View File

@@ -3,30 +3,11 @@
<div id="mvcomments-box">
<div id="mvcomments"></div>
</div>
<script src="https://cdn.jsdelivr.net/npm/minivaline@2/dist/MiniValine.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/minivaline@5"></script>
<script>
new MiniValine({
el: '#mvcomments',
appId: '<%- theme.leancloud.app_id %>',
appKey: '<%- theme.leancloud.app_key %>',
mode: '<%- theme.minivaline.mode %>',
placeholder: '<%- theme.minivaline.placeholder %>',
pathname: window.location.pathname,
lang: '<%- theme.minivaline.lang %>',
adminEmailMd5: '<%- theme.minivaline.adminEmailMd5 %>',
tagMeta: <%- '["' + theme.minivaline.tagMeta.join('", "') + '"]' %>,
master: <%- '["' + theme.minivaline.master.join('", "') + '"]' %>,
friends: <%- '["' + theme.minivaline.friends.join('", "') + '"]' %>,
math: <%- theme.minivaline.math %>,
md: <%- theme.minivaline.md %>,
enableQQ: <%- theme.minivaline.enableQQ %>,
NoRecordIP: <%- theme.minivaline.NoRecordIP %>,
visitor: <%- theme.minivaline.visitor %>,
maxNest: <%- theme.minivaline.maxNest %>,
pageSize: <%- theme.minivaline.pageSize %>,
serverURLs: '<%- theme.minivaline.serverURLs %>',
emoticonUrl: <%- '["' + theme.minivaline.emoticonUrl.join('", "') + '"]' %>,
});
new MiniValine(Object.assign(<%- JSON.stringify(theme.minivaline) %>, {
el: '#mvcomments',
}));
const infoEle = document.querySelector('#mvcomments .info');
if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
infoEle.childNodes.forEach(function (item) {