Hi
can someone help me to fix javascript code for my blog, its loads by default from the template
This is part of the code
“`
while(rangkumanPosts<relmaxposts)
{
if(relurls[r]!=dirURL)
{
relhasil=”<li class=’news-title clearfix’>”;
relhasil+=”<a href='”+relurls[r]+”‘ ><img src='”+relgambar[r]+”‘ alt='”+reljudul[r]+”‘/></a>”;
relhasil+=”<a href='”+relurls[r]+”‘ alt='”+reljudul[r]+”‘>”+reljudul[r]+”</a>”;
relhasil+=”<span class=’news-text’>”+relcuplikan[r]+” … <a href='”+relurls[r]+”‘ aria-label='”+reljudul[r]+”‘ target=’_top’>”+morelink+”</a><span class=’news-text’>”;
relhasil+=”</li>”;
document.write(relhasil);
rangkumanPosts++;
if(rangkumanPosts==relmaxposts)
{
break
}
}
if(r<reljudul.length-1)
>
document.write(relhasil);
i failed in lighthouse test in document write part, lighthouse suggest to avoid using that command, tried to delete the line but some feature in my blog become not working
Thank you