How to remove Blogger (or any free blogging platform) credits from the footer

I am not sure if removing the footer credits is legal or not, but I just wanted to try doing it. As I searched the internet, I found several pages describing how it could be done by making some adjustments in CSS. However, I could not find an article which uses simple JavaScript commands to do the same. So, I decided the write this.

As you can see now, my footer does have Powered By Blogger credit signature. I am intending on keeping it that way until I am sure that removing it would not get me into any legal issues. I am just writing this article for the educational purposes.

Right click on the Powered By Blogger button and click on Inspect to have Chrome Developer tools loaded with the div that holds the credit content.



You can see that the element should have a content similar to the following. Notice that the div is having a class value blogger. We can use this to our advantage.

<div class="blogger">
<a href="https://www.blogger.com" rel="nofollow">
<svg class="svg-icon-24">
<use xlink:href="/responsive/sprite_v1_6.css.svg#ic_post_blogger_black_24dp" xmlns:xlink="http://www.w3.org/1999/xlink"></use>
</svg>
Powered by Blogger
</a>
</div>
As a JavaScript developer, the Console (Tab on the top) would always come in handy. I started trying in the following commands and I confirmed that this could be done.



  • document.getElementsByClassName('blogger')
    This returned an HTMLCollection with just one element in it. This confirms that the 0th element is the signature that we are looking for.
  • document.getElementsByClassName('blogger')[0].style.display = "none"
    As I ran the above command, the credit vanished. So that is what we need.




Now, you can add this JavaScript command in such a way that the command gets loaded after the credit is loaded. Therefore, I decided to put this up in a Gadget. Go to Layout > Add Gadget and click on HTML/JavaScript.



Add the following into the content and save.

<script>
document.getElementsByClassName('blogger')[0].style.display = "none";
</script>



Now, just refresh your blog and you can observe the Powered By Blogger credit gone. You use the same technique to remove almost all credits from different Blogging service provider, different free website hosting services, etc.

Comments

Popular posts from this blog

Programming bouncing ball in JavaScript

Slideshow on Google Images

Estimating the value of Pi using Monte Carlo Method