⚡ Improve page scripts configuration files.
This commit is contained in:
12
assets/js/third-party/comments/waline.js
vendored
12
assets/js/third-party/comments/waline.js
vendored
@@ -1,8 +1,8 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
const element = '.waline-container';
|
||||
if (!NexT.CONFIG.comments.enable
|
||||
|| !NexT.CONFIG.waline
|
||||
if (!NexT.CONFIG.page.comments
|
||||
|| !NexT.CONFIG.page.waline
|
||||
|| !NexT.utils.checkDOMExist(element)) return;
|
||||
|
||||
const {
|
||||
@@ -13,13 +13,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
requiredmeta,
|
||||
serverurl,
|
||||
wordlimit
|
||||
} = NexT.CONFIG.waline.config;
|
||||
} = NexT.CONFIG.page.waline.cfg;
|
||||
|
||||
|
||||
const waline_css = NexT.utils.getCDNResource(NexT.CONFIG.waline.css);
|
||||
const waline_css = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.css);
|
||||
NexT.utils.getStyle(waline_css, null);
|
||||
|
||||
const waline_js = NexT.utils.getCDNResource(NexT.CONFIG.waline.js);
|
||||
const waline_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.js);
|
||||
|
||||
const locale = {
|
||||
placeholder: placeholder
|
||||
@@ -39,7 +39,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
wordLimit : wordlimit,
|
||||
requiredMeta : requiredmeta,
|
||||
serverURL : serverurl,
|
||||
lang : NexT.CONFIG.lang,
|
||||
lang : NexT.CONFIG.page.lang,
|
||||
dark : "auto"
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user