Easily get rid of links from Blogger comments using Javascript


Many folks out there are addicted to leaving comments on BlogSpot blogs with links (some of them point to their sites for the purpose of getting backlinks, while the majority of them are spam links leading to spam sites).
 
If you are looking for a simple and direct approach to removing links from your BlogSpot blog with the help of one single piece of JavaScript code, then you’re at the right place.
 
Keep it in mind: even if you leave a comment on a BlogSpot blog with a link pointing to your site, you’ll end up with a nofollow backlink pointing to your site.
 
Nofollow backlinks are less effective for the site’s SEO, but they have their own advantages too.
 
In this post, I’ll guide you on how to install this code in your site template if you don’t know how to do so.
 
Copy the code below
 
 
<script>$('.comment-content a[rel$=nofollow]').replaceWith(function(){return($(this).text());});</script>

How to Setup this Code

  1. Login to your blogger dashboard, click on the menu icon located at the top-left corner of the screen, and click on "Theme.
  2. A new page will load, just click on the chevron down, and a mini links list will appear.
  3. Click on "Edit HTML."
  4. You'll be taken to the Blogger theme editor page; scroll down to the closing tag of your HTML document and paste your JavaScript code above it before saving changes.
After you saved the JavaScript code mentioned above inside your blog template, I'm now congratulating you. The comment section of your blog is now free of spam links.
 

Wrap Up

I want to hear from you, what do you think about this post? Leave a say!
Abba Abdullahi Garba

Abba Abdullahi Garba, also known as Zugson, is a Nigerian upcoming artist and songwriter, tech bro, part-time blogger, and writer. He is the writer of his own songs as well as his own story.

Post a Comment

Previous Post Next Post