Notification texts go here. Contact Us Buy Now!
$10.00
10
$000

Get your blog ready With details you won't find anywhere.

blogger widgets | How To Remove Active Links In Blogger Comments

abdalrahman
Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated
how-to-remove-active-links-in-blogger-comments



Most comment bloggers do it to create a backlink for their blog. If in the future the active link dies and is no longer accessible, it changes to a broken link, which will be bad for your blog.
So today I will show you How To Remove Active Links In Blogger Comments Quickly. Let's start stopping now.


How To Remove Active Links In Blogger Comments


how-to-remove-active-links-in-blogger-comments

I will show you 2 ways to remove active links in comments:
  1. Link key to plain text.
  2. Remove the entire comment and replace it.

1. Deactivate links to plain text:


This way, any active link inserted will be automatically disabled, it will become plain text without changing the whole text.
There are 2 types of scripts that you can try on your blog, JavaScript and jQuery . Try one of the two.

JavaScript


<script> //<![CDATA[/* Remove Active Link in Comments by Josiah Sinuhaji */content = document.getElementById('comments').getElementsByTagName('p');for (var i = 0; i < content.length; i++) { if (content[i].innerHTML.indexOf('</a>') !== -1) { content[i].innerHTML = content[i].innerHTML.replace(/<a[^>]*>|<\/a>/g, ""); }}//]]> </script>

jQuery


<script> //<![CDATA[/* Remove Active Link in Comments by Josiah Sinuhaji */$(function(){$('#comments p').find('a').contents().unwrap();});//]]> </script>

Click Save topic and go to your blog to see the results.

2. Delete the entire comment and replace it


With this method spam comments will be deleted and replaced with your custom message.
Same steps as above, paste below code just above </body> . tag
<script> //<![CDATA[/* Remove Active Link in Comments by Josiah Sinuhaji */var content = document.getElementById('comments').getElementsByTagName('p');for (var i = 0; i < content.length; i++) { if (content[i].innerHTML.indexOf('</a>') !== -1) {  content[i].innerHTML = ' Sorry ... you cannot enter an active link here! Automatic comments are disabled by nguyenlamblog.xyz '; }}//]]> </script>

Hope this article is useful to you. If you have any problem, please comment below to let me know.




Read Also

Getting Info...

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.