Ahad, 21 Oktober 2012

How to remove blogger widget javascript

If before i've posting about how to remove the blogger CSS reset, now i'll posting about how to remove the blogger widget javascript in before body tag. But i don't know the fonction about this script so maybe there are a risk if removing this code. But many of my friends yesterday asking about how to remove this, so now i'll share it. But remember this tutorial is ADVANCED tutorial not recommended for newbie coder.

How to remove <script type="text/javascript" src="//www.blogger.com/static/v1/widgets/1708301263-widgets.js"></script> in blogger?

WARNING!
Removing this code maybe can make your template destroyed, if you use official widget from blogger, the fonction can be totally changed. If you're don't understand about this code, don't do this. This tutorial is ADVANCED tutorial, not recommended for newbie or intermediate coder.

Explanation

This tutorial is simple, just like my post before, i just add a HTML comments before </body> tag and the javascript of HTML will converted to HTML comments, so browser will ignore them. This tutorial will be effected to Gtmetrix.

Ok now for tutorial.

Tutorial

  1. Open blogger, edit HTML, and backup your template for safety.
  2. Edit HTML, proceed, then CTRL+F this code: </body>
  3. Replace that code with:
    &lt;!--<div id='by Damar Zaky http://damzaky.blogspot.com do not remove this text if you are a real blogger'/></body>--&gt;&lt;/body&gt;
  4. Then save template.
  5. You're finish!

Checking

Open your blog, then CTRL+U,  if you found the <script type="text/javascript" src="//www.blogger.com/static/v1/widgets/1708301263-widgets.js"></script> turning to green and below that code all are green, that means you're succes.

Or you can open http://www.gtmetrix.com then type your blog in the form, if the site finish checking, you may found the tab 'Minify JavaScript', if you click, and you not found this code http://www.blogger.com/static/v1/widgets/1708301263-widgets.js , it means you're succes.....

Ok i'll update later, if you have any question or problem, you can ask in comments.

2 ulasan: