'use strict';dotclear.ready(()=>{dotclear.antispam={counter:null,};dotclear.dbSpamsCount=(icon_spam)=>{dotclear.jsonServicesGet('getSpamsCount',(data)=>{const nb=data.ret;if(nb===dotclear.antispam.counter){return;}
const url=`${icon_spam.getAttribute('href')}&status=-2`;const icon=document.querySelector(`#dashboard-main #icons p a[href="${url}"]`);if(icon){const nb_label=icon.querySelector('span.db-icon-title-spam');if(nb_label){nb_label.textContent=nb;}}else if(nb!==''){const xml=` <a href="${url}"><span class="db-icon-title-spam">${nb}</span></a>`;icon_spam.after(...dotclear.htmlToNodes(xml));}
dotclear.antispam.counter=nb;});};const icon_spam=document.querySelector('#dashboard-main #icons p #icon-process-comments-fav');if(icon_spam){dotclear.dbSpamsCount(icon_spam);dotclear.antispam.timer=setInterval(dotclear.dbSpamsCount,60*1000,icon_spam);}});