Permalink
Browse files

Fixed position of 'Public Posts'

  • Loading branch information...
1 parent 0f544a6 commit aec85a6d9c8ce11e7e7eb7ad5adb675ec27180e1 huyz committed Sep 18, 2011
Showing with 7 additions and 4 deletions.
  1. +1 −1 gplusx
  2. +5 −2 gpme.js
  3. +1 −1 manifest.json
2 gplusx
Submodule gplusx updated from e0216d to 3f68ea
View
@@ -4086,7 +4086,9 @@ function onHoverCardUpdated(e, $hoverCard) {
var $hoverCardButtonTopTab = $('<div id="gpme-card-posts-tab-top" class="gpme-card-posts-tab">Top</div>').click(handler);
var $hoverCardButtonCloudTab = $('<div id="gpme-card-posts-tab-cloud" class="gpme-card-posts-tab">Cloud</div>').click(handler);
var $hoverCardButtonTabs = $('<div id="gpme-card-posts-tabs" style="display:none"></div>').append($hoverCardButtonRecentTab, $hoverCardButtonTopTab, $hoverCardButtonCloudTab);
- var $hoverCardButtonTd = $('<td colspan=2 id="gpme-card-posts-button"><div id="gpme-card-posts-button-text">Posts</div></td>').append($hoverCardButtonTabs);
+ // NOTE: G+'s hovercards can sometimes actually stretch out invisible; e.g., if there are a lot of followees
+ // in common. This makes our children stretch out improperly, so we have to limit the size.
+ var $hoverCardButtonTd = $('<td colspan=2 id="gpme-card-posts-button"><div id="gpme-card-posts-button-text" style="max-width:' + $hoverCard.width() + 'px">Public Posts</div></td>').append($hoverCardButtonTabs);
var $hoverButton = $('<tr></tr>').append($hoverCardButtonTd).appendTo($tbody);
var $cardPosts = $hoverCardPostsTpl.clone().insertAfter($hoverButton);
@@ -4133,7 +4135,8 @@ function onCardPostsButtonMouseEnter($hoverCard, $cardPosts, $hoverButton) {
var $postsContent = $hoverCard.find('#gpme-card-posts-content');
$postsContent.slideDown();
- // XXX Don't know why I have to do this but the items sometimes stretch outside the table otherwise.
+ // NOTE: G+'s hovercards can sometimes actually stretch out invisible; e.g., if there are a lot of followees
+ // in common. This makes our children stretch out improperly, so we have to limit the size.
$postsContent.children().css('max-width', finalHoverCardWidth - 10);
// Get the ID of the user
View
@@ -1,7 +1,7 @@
{
"default_locale": "en",
"name": "__MSG_extensionName__",
- "version": "7.0.0",
+ "version": "7.0.1",
"minimum_chrome_version": "12",
"description": "__MSG_extensionDescription__",

0 comments on commit aec85a6

Please sign in to comment.