FastComments.com
Here you can edit and run the code snippet from our documentation.
Example Code Snippet "Re-Rending a Comment"
(function () { const extension = FastCommentsUI.extensions.find((extension) => { return extension.id === 'my-extension'; }); let renderCount = 0; extension.commentFilter = function(comment, html) { renderCount++; return `
The render count is ${renderCount}!
` + html; } extension.onInitialRenderComplete = function() { setInterval(function() { extension.reRenderComment(extension.commentsById[Object.keys(extension.commentsById)[0]], function renderDone() { console.log('Comment re-render done.'); }); }, 2000); // timeout not required, just an example. } })();
Result