Upgrade third party js logic improve load speed.

This commit is contained in:
凡梦星尘
2022-10-26 22:37:03 +08:00
parent 90df1e1247
commit 525c8a7cf5
10 changed files with 58 additions and 27 deletions

View File

@@ -1,4 +1,5 @@
NexT.comments.giscus = function() {
/* Artalk comment plugin */
NexT.plugins.comments.artalk = function() {
const element = '.artalk-container';
if (!NexT.CONFIG.artalk
|| !NexT.utils.checkDOMExist(element)) return;

View File

@@ -1,4 +1,5 @@
NexT.comments.giscus = function() {
/* Giscus comment plugin */
NexT.plugins.comments.giscus = function() {
const element = '.giscus-container';
if (!NexT.CONFIG.page.comments
|| !NexT.CONFIG.giscus

View File

@@ -1,4 +1,5 @@
NexT.comments.giscus = function() {
/* LiveRe comment plugin */
NexT.plugins.comments.livere = function() {
const element = '#lv-container';
if (!NexT.CONFIG.livere
|| !NexT.utils.checkDOMExist(element)) return;

View File

@@ -1,4 +1,5 @@
NexT.comments.giscus = function() {
/* Utterances comment plugin */
NexT.plugins.comments.utterances = function() {
const element = '.utterances-container';
if (!NexT.CONFIG.utterances
|| !NexT.utils.checkDOMExist(element)) return;

View File

@@ -1,4 +1,5 @@
NexT.comments.waline = function() {
/* Waline comment plugin */
NexT.plugins.comments.waline = function() {
const element = '.waline-container';
if (!NexT.CONFIG.waline
|| !NexT.utils.checkDOMExist(element)) return;