• About
  • Contact
  • Disclimer
  • Privacy Policy

Prevent Active Links in comments with JavaScript

 on Saturday, 13 June 2015  

image: mybacklink86.blogspot.com

Removes active link in a comment blogger could use CSS to manipulate it, but it is not absolute because the active link is still visible in the Page Source and overall stillunreadable by the search engines. Best solution is to use JavaScript to turn off theactive link.

Here's a way to prevent active links in comments on our blog

Attach the JavaScript at the top </body>
<script type='text/javascript'> //<![CDATA[ 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 = "<mark>Link Aktif..!!</mark> Tidak Diperbolehkan di Blog Ini..!!!";             content[i].className = "spammer-detected";         }     } } blockLinks('comment_block', 'p'); //]]> </script>
How, easy is it, that's the script to prevent active links on our blog, hope this article is useful. Don't forget to comment :D

Prevent Active Links in comments with JavaScript 4.5 5 rt12 Saturday, 13 June 2015 Prevent Active Links in comments with JavaScript image: mybacklink86.blogspot.com Removes active link in a comment blogger could use CSS to manipulate it, but it is not absolute becaus...


No comments:

Post a Comment

J-Theme