Permalink
Browse files

google+ uses inner element to avoid inline styles on socialite element

  • Loading branch information...
1 parent c4ea3bc commit bc2851d5dbe1e7c14fab74cad6ab80706be8374a @dbushell dbushell committed Jun 11, 2012
Showing with 6 additions and 3 deletions.
  1. +2 −1 extensions/socialite.googleplus.js
  2. +3 −1 socialite.js
  3. +1 −1 socialite.min.js
@@ -37,6 +37,7 @@
el.className = 'g-' + instance.widget.gtype;
Socialite.copyDataAttributes(instance.el, el);
instance.el.appendChild(el);
+ instance.gplusEl = el;
};
var googleplusEvent = function(instance, callback) {
@@ -55,7 +56,7 @@
for (var i = 0; i < events.length; i++) {
params[events[i]] = googleplusEvent(instance, settings[events[i]]);
}
- window.gapi[type].render(instance.el, params);
+ window.gapi[type].render(instance.gplusEl, params);
}
};
View
@@ -632,6 +632,7 @@ window.Socialite = (function(window, document, undefined)
el.className = 'g-' + instance.widget.gtype;
Socialite.copyDataAttributes(instance.el, el);
instance.el.appendChild(el);
+ instance.gplusEl = el;
};
var googleplusEvent = function(instance, callback) {
@@ -650,12 +651,13 @@ window.Socialite = (function(window, document, undefined)
for (var i = 0; i < events.length; i++) {
params[events[i]] = googleplusEvent(instance, settings[events[i]]);
}
- window.gapi[type].render(instance.el, params);
+ window.gapi[type].render(instance.gplusEl, params);
}
};
Socialite.widget('googleplus', 'one', { init: googleplusInit, activate: googleplusActivate, gtype: 'plusone' });
Socialite.widget('googleplus', 'share', { init: googleplusInit, activate: googleplusActivate, gtype: 'plus' });
+ Socialite.widget('googleplus', 'badge', { init: googleplusInit, activate: googleplusActivate, gtype: 'plus' });
// LinkedIn
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit bc2851d

Please sign in to comment.