Saturday, September 22, 2012

Watch Out with Recent Post Widget for Blogger

I was just trying to enhance my blog ad wanted to add a plugin to show the latest posts on my site.
As I couldn't find a recent post plugin from the Blogger plugin list i decided to do some search to find out.

I tumbled upon a site that showed a code snippet that I should copy and paste on a simple HTML/Javacript gadget and that would do the trick.

Don't ever copy and paste strange javascript code snippets into your site.

The script tag src looked like this:
<script style="text/javascript" src=""></script> <script style="text/javascript">var numposts = 5;var showpostdate = false;var showpostsummary = false;var numchars = 50;var standardstyling = true;</script><script src=""></script>

And it was simple and easy to copy and paste that into a blogger gadget and then publish it on my site.
The XXX corresponds to another name.

When I published this thing I saw that the padding bottom was too big and I examined the source code to see what was the matter when I saw this:

<a style="font-size: 8px; text-decoration:none; color: white; opacity:0.0;filter:alpha(Opacity=0)" href="">recent-posts widget</a>

So they are injecting your site with an unwanted link that you don't see but it is there, which is invisible because of the style rules in it.

So watch out, just because the snippet's code is hosted in doesn't mean that is fair.
If you want a recent post widget you can do it with feedsburner, through their publicize options.
That will create a Recent Post widget into your blogger website.

And it is better to only install google plugin's, never any other code snippet that you wouln't know what it does to your site.


Post a Comment

Your opinion is very appreciated, thank you!