[livejournal] r23293: LJSUP-14238: Can't see sharing buttons i...
Committer: vvasin
LJSUP-14238: Can't see sharing buttons in the IE. Fix google plusone button for IE.U trunk/htdocs/js/livejournal.js
Modified: trunk/htdocs/js/livejournal.js
===================================================================
--- trunk/htdocs/js/livejournal.js 2012-11-13 10:28:07 UTC (rev 23292)
+++ trunk/htdocs/js/livejournal.js 2012-11-13 13:11:29 UTC (rev 23293)
@@ -485,15 +485,18 @@
* @param {jQuery} $node jQuery node with likes in which we will search for google +1 button for parsing
*/
function parseGoogle($node) {
- var item = $node.find( selectors.google );
+ var $button = $node.find( selectors.google ).children().first(), // jquery node <g:plusone />
+ button = null; // raw DOM node <g:plusone>
- if (item.length === 0) {
+ if ($button.length === 0) {
return;
}
- // gapi could
+ button = $button.get(0);
+
+ // gapi could throw errors
try {
- window.gapi.plusone.go( item.get(0) );
+ window.gapi.plusone.render( button, { size: button.size, href: button.href } );
} catch (e) {
console.warn(e.message);
}
