/*
 * Facebook - Shorter app-based news
 *
 * Shortens Facebook Application feed items on profiles and News Feed, adding a
 * "Details" link to the full feed story description (and others of that app).
 * Application-generated updates are also grayed out to further de-emphasize.
 *
 * Copyright 2007 by Adam Katz <scriptsATkhopiscom>, v1.1 (2007-11-16), GPL 2+.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License <http://www.gnu.org/licenses> for details.
 *
 * DEVELOPER NOTES:
 * If we could specify "url(*.facebook.com/home.php?*)" or the like, we could clean up
 * this code considerably, enabling only home.php and profile.php so that we
 * didn't need the following silliness to avoid stories.php and minifeed.php.
 * 
 * Feed on home.php ONLY:  a .home_main_item next to a #autoset_timezone
 * Feed on profile.php ONLY: a #minifeed whose parent DIV has no older sibling.
 * News Feed app-based news is in a .app_story within the feed.
 * Mini-Feed app-based news is in a .platform within the feed.
 */

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("facebook.com") {
  /* Apps are grayed instead of having dividers */
  #autoset_timezone + .home_main_item .bumper    { display:none!important; }
  #autoset_timezone + .home_main_item .app_story *, 
    div:first-child > #minifeed .create_album *, 
    div:first-child > #minifeed .platform *      { border:none!important; }

  /* Gray out the apps */
  #autoset_timezone + .home_main_item .app_story h2.feed_story_header,
    div:first-child > #minifeed .platform h2.xhas_media 
      { font-weight:normal; color:#aaa!important; }
  #autoset_timezone + .home_main_item .app_story h2.feed_story_header a,
    div:first-child > #minifeed .platform h2.xhas_media a
      { color:#aae!important; }

  /* insert "Details" and make everything line up correctly */
  #autoset_timezone + .home_main_item .app_story .feed_story_wrapper,
    div:first-child > #minifeed .platform .title
      { width:320px!important; }
  #autoset_timezone + .home_main_item .app_story .feed_story_wrapper, 
    div:first-child > #minifeed .platform .body 
      { height:1em!important; float:none!important; margin-left:2em; }
  #autoset_timezone + .home_main_item .app_story > .feed_icon > a,
    div:first-child > #minifeed .platform > .icon > a
      { white-space:nowrap;  }
  #autoset_timezone + .home_main_item .app_story > .feed_icon > a:after, 
    div:first-child > #minifeed .platform > .icon > a:after
      { content:"Details"; vertical-align:5px; }
  #autoset_timezone + .home_main_item .app_story > .feed_icon > a:after
      { margin-left:365px; } /* newsfeed is a bit wider */
  div:first-child > #minifeed .platform > .icon > a:after
      { margin-left:325px; font-size:10px; } /* minifeed needs font sizing */
  #autoset_timezone + .home_main_item .app_story > .feed_icon > a:hover,
    div:first-child > #minifeed .platform > .icon > a:hover
      { text-decoration:none!important; }
  #autoset_timezone + .home_main_item .app_story > .feed_icon > a:hover:after,
    div:first-child > #minifeed .platform > .icon > a:hover:after
      { text-decoration:underline!important; }

  /* Don't show the body contents; user now clicks "Details" for that */
  #autoset_timezone + .home_main_item .app_story .feed_story_body,
    div:first-child > #minifeed .platform .extra_media
      { display:none!important; }

}