How to Block the Spammer Commentator in Blogger

How to Block the Spammer Commentator in Blogger Comments.

How to Block the Spammer Commentator in Blogger


Lets Start!


Goto Blogger Dashboard => Template => Edit Html
Find the </body> Tag.
and Paste this code Above it.(Above "here"</body>)..


<script type='text/javascript'>
//<![CDATA[
var spamlist=[
 'http://www.blogger.com/profile/12345678', /* Spammer's Profile Url */
 'http://nameblog.blogspot.com/', /* Spammer's Blog Url */
'Address URL commentator to-3'  / * don't add url after last comma * /
];
for(var v=0; v<spamlist.length; v=v+1){
 $("a[href='"+spamlist[v]+"']").each(function(){
 $(this).closest(".comment-block").find(".comment-content")
 .replaceWith("<div class='comment-content' style='color:red'>you have been banned! Please Leave this Blog!</div>"),
     $(this).replaceWith("<span style='color:red'>BANNED USER!</span>");
 })
}
//]]>
</script>


  • Replace http://www.blogger.com/profile/12345678 with spammer user's profile link 
  • Replace http://namablog.blogspot.com with Spammer user's Blog/Site.


If You are using Threaded Comment then add this Javascript code before <body> Tag.


<script type='text/javascript'>
//<![CDATA[
var spamlist=[
 'http://www.blogger.com/profile/12345678', /* Spammer's Profile Url */
 'http://namablog.blogspot.com/', /* Spammer's Blog Url */
'Address URL commentator to-3'  / * don't add url after last comma * /
];
for(var v=0; v<spamlist.length; v=v+1){
 $("a[href='"+spamlist[v]+"']").each(function(){
 $(this).closest(".comment_inner").find(".comment_body")
 .replaceWith("<div class='.comment_body' style='color:red'>you have been banned! Please Leave this Blog!</div>"),
     $(this).replaceWith("<span style='color:red'>BANNED USER!</span>");
 })
}
//]]>
</script>


    I hope you like this amazing new trick about Banning a spammer user/commentator from Comments. If you have question must leave your comment. & don't forget to share ;)

    3 comments:

    1. Very informative, keep posting such good articles, it really helps to know about things.

      ReplyDelete
    2. A lot of us are still unaware of the recent development of the Blank ATM card.. An ATM card that can change your financial status within few days. With this Blank ATM card, you can withdraw between $1000-$10,000 daily from any ATM machine in the world. There is no risk of getting caught by any form of security if you followed the instructions properly. The Blank ATM card is also sophisticated due to the fact that the card has its own security making your transaction very safe and untraceable. For more info contact us with the below address and you can also watch our YouTube to read customers review.
       
       E-mail: unitedblankatmhackcard@gmail.com

      ReplyDelete
    3. If you're looking to burn fat then you certainly have to start using this totally brand new personalized keto plan.

      To create this keto diet service, certified nutritionists, personal trainers, and top chefs have united to develop keto meal plans that are useful, suitable, cost-efficient, and delightful.

      Since their grand opening in 2019, 100's of clients have already completely transformed their figure and health with the benefits a professional keto plan can offer.

      Speaking of benefits: in this link, you'll discover 8 scientifically-certified ones provided by the keto plan.

      ReplyDelete

    Facebook Followers

    Follow This Blog