How to Hide Active Links on Comments - This time Templates Boy will share how to hide active links in comments to prevent spammers who deliberately put an active link with the aim of getting a backlink to the url link that is installed and this is indeed quite annoying because usually the spammers comment does not match the existing article.
Well, how do I remove / hide active links in Blogger comments? Let's look at the following steps :
2. Click Template > Edit HTML > Save the code below just above the code </body>
3. To beautify the warning color of the code above, add this CSS code above the code ]]></b:skin> or </style>.
4. Save the template.
Note: If JavaScript still doesn't work, try replacing the blockLinks execution code('comment-holder', 'p'); become blockLinks('cm_block', 'p'); or blockLinks('comment_block', 'p'); or blockLinks('comment-body', 'p');.
Thereby How to Hide Active Links on Comments, may be useful.
Well, how do I remove / hide active links in Blogger comments? Let's look at the following steps :
How to Hide Active Links on Comments
1. Open your blogger account2. Click Template > Edit HTML > Save the code below just above the code </body>
<script type='text/javascript'>
//<![CDATA[
//Block Comments Link
function blockLinks(parentID, children) {
var parent = document.getElementById(parentID),
content = parent.getElementsByTagName(children);
for(var i = 0; i < content.length; i++) {
if(content[i].innerHTML.indexOf('</a>') !== -1) {
content[i].innerHTML = "Do not add active links bro!";
content[i].className = "spammer-detected";
}
}
}
blockLinks('comment-holder', 'p');
//]]>
</script>
3. To beautify the warning color of the code above, add this CSS code above the code ]]></b:skin> or </style>.
p.spammer-detected {
background: #9eb2c0;
position: relative;
display: table;
margin: 10px 0;
padding: 10px 15px;
color: #fff;
font-size: 95%;
border-radius: 2px;
}
4. Save the template.
Note: If JavaScript still doesn't work, try replacing the blockLinks execution code('comment-holder', 'p'); become blockLinks('cm_block', 'p'); or blockLinks('comment_block', 'p'); or blockLinks('comment-body', 'p');.
Thereby How to Hide Active Links on Comments, may be useful.