⚡ Use script to control comments container show.
This commit is contained in:
@@ -63,6 +63,8 @@ NexT.utils = {
|
||||
* One-click copy code support.
|
||||
*/
|
||||
registerCopyCode: function() {
|
||||
if (!NexT.CONFIG.copybtn) return;
|
||||
|
||||
let figure = document.querySelectorAll('.highlight pre');
|
||||
if (figure.length === 0 || !NexT.CONFIG.copybtn) return;
|
||||
figure.forEach(element => {
|
||||
@@ -277,7 +279,7 @@ NexT.utils = {
|
||||
});
|
||||
},
|
||||
|
||||
initCommontesDispaly: function(){
|
||||
initCommontesDispaly: function(){
|
||||
const comms = document.querySelectorAll('.comment-wrap > div');
|
||||
if (comms.length<=1) return;
|
||||
comms.forEach(function(item){
|
||||
@@ -302,6 +304,10 @@ NexT.utils = {
|
||||
});
|
||||
},
|
||||
|
||||
hideCommontes:function() {
|
||||
document.querySelector('.post-comments').style.display = 'none';
|
||||
},
|
||||
|
||||
hiddeLodingCmp: function(selector) {
|
||||
const loadding = document.querySelector(selector).previousElementSibling;
|
||||
loadding.style.display = 'none';
|
||||
|
||||
Reference in New Issue
Block a user