Skip to content

Instantly share code, notes, and snippets.

@rfadams
Created December 16, 2011 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rfadams/1488327 to your computer and use it in GitHub Desktop.
Save rfadams/1488327 to your computer and use it in GitHub Desktop.
jQuery for Gmail Sidebar
var $main_frame = $('#canvas_frame').contents();
var $sideBar = $main_frame.find('.HbF0O > .nH');
if ($sideBar.length > 0){
if ($sideBar.children().length == 3){
$sideBar.find('.ChoCtb .nH:last-child').after(html);
} else {
$sideBar.prepend(html);
}
$sideBar.children('.nH:last-child').hide();
}else{
$main_frame.find('.nH.adC > .nH > .nH:last').remove();
$sideBar = $main_frame.find('.nH.adC > .nH > .nH:last');
$sideBar.html(html);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment