r21435 - htdocs/branches/beta/externals - Try to validate the facebook button.

Cristian Marchi cmarchi at code.gnucash.org
Tue Oct 18 08:13:55 EDT 2011


Author: cmarchi
Date: 2011-10-18 08:13:55 -0400 (Tue, 18 Oct 2011)
New Revision: 21435
Trac: http://svn.gnucash.org/trac/changeset/21435

Modified:
   htdocs/branches/beta/externals/header.phtml
Log:
Try to validate the facebook button.

Modified: htdocs/branches/beta/externals/header.phtml
===================================================================
--- htdocs/branches/beta/externals/header.phtml	2011-10-18 10:14:41 UTC (rev 21434)
+++ htdocs/branches/beta/externals/header.phtml	2011-10-18 12:13:55 UTC (rev 21435)
@@ -60,15 +60,18 @@
 <!--facebook like button-->
 <div style="padding:0 0 5px 0">
 <div id="fb-root"></div>
-<script>(function(d, s, id) {
-  var js, fjs = d.getElementsByTagName(s)[0];
-  if (d.getElementById(id)) {return;}
-  js = d.createElement(s); js.id = id;
-  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
-  fjs.parentNode.insertBefore(js, fjs);
-}(document, 'script', 'facebook-jssdk'));</script>
-
-<div class="fb-like" data-href="www.gnucash.org" data-send="false" data-layout="box_count" data-width="60" data-show-faces="true" data-font="verdana"></div>
+    <script type="text/javascript">
+    //<![CDATA[
+    (function() {
+        document.write('<fb:like width="200" data-href="www.gnucash.org" data-send="false" data-layout="box_count" data-width="60" data-show-faces="true" data-font="verdana"></fb:like>');
+        var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
+        s.type = 'text/javascript';
+        s.async = true;
+        s.src = 'http://connect.facebook.net/en_US/all.js#xfbml=1';
+        s1.parentNode.insertBefore(s, s1);
+    })();
+    //]]>
+    </script>
 </div>
 <!-- google +1 button-->
 <g:plusone size="tall" href="http://www.gnucash.org/"></g:plusone>



More information about the gnucash-changes mailing list