function processCommentBodies() {
const elements = document.querySelectorAll('.comment-content');
elements.forEach(element => {
if (element.textContent.includes('/@Invisible-Ink/')) {
const tempDiv = document.createElement('div');
tempDiv.innerHTML = element.innerHTML;
tempDiv.innerHTML = tempDiv.innerHTML.replace(/\/@Invisible-Ink\/\s*/g, '');
element.innerHTML = tempDiv.innerHTML;
element.style.filter = 'blur(5px)';
element.addEventListener('click', function() {
this.style.filter = 'none';
});
}
});
}
window.onload = processCommentBodies;
document.addEventListener('pjax:success', processCommentBodies);
如何使用
评论时同时加上/@Invisible-Ink/即可
这是一条小小的信息
/@Gentle/
震动一下叭
/@Shake/
嘻嘻/@Loud/
这是一条Slam信息/@Slam/
这是一条评论
/@Invisible-Ink/