JavaScripts

Comentarios Recientes

 Este codigo muestra los ultimos comentarios en este blog:

<script language="javascript"> var numcomments = 10;var numchars = 60;</script> <script type="text/javascript" src="https://matrixfanblog.blogspot.com/feeds/comments/default?published&alt=json-in-script&callback=commentDisplay"></script>

Contador de visitas en las entradas individuales

El siguiente codigo es el que se utiliza para contar las visitas en cada posts de manera individual:

<!--Contador de visitas-->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<script src='https://cdn.firebase.com/v0/firebase.js' type='text/javascript'/>
<script> $.each($(&quot;a[name]&quot;), function(i, e) { var elem = $(e).parent().find(&quot;#postviews&quot;); var blogStats = new Firebase(&quot;https://******.firebaseio.com/pages/id/&quot; + $(e).attr(&quot;name&quot;)); blogStats.once(&quot;value&quot;, function(snapshot) { var data = snapshot.val(); var isnew = false; if(data == null) { data= {}; data.value = 0; data.url = window.location.href; data.id = $(e).attr(&quot;name&quot;); isnew = true; } elem.text(data.value); data.value++; if(window.location.pathname!=&quot;/&quot;) { if(isnew) blogStats.set(data); else blogStats.child(&quot;value&quot;).set(data.value); } }); }); </script>
</b:if>
<!--FIN Contador de visitas -->