1 review
This little script improves the usability of friendfeed's navigation. Fixing the sidebar menu is a great idea that eventually let users to check personal lists and rooms without any interruption. Quick access links for personal comments/likes are what I exactly need. It takes you directly to the commented threads with a single click. The ordinary flow was requiring 3 clicks which is a significant time-loss.
As a final notice, I had to exclude (comment-out) the following line because the script did not work properly with greasekit.
$ = unsafeWindow.jQuery;
I also added a link for the user's discussion page:
//styles
var likesStyle = 'style="padding:4px 0 2px 18px; background:url(http://friendfeed.com/static/images/smile.png?v=2) no-repeat; font-size:10px"';
var commentsStyle = 'style="padding:4px 0 2px 18px; background:url(http://friendfeed.com/static/images/comment-friend.png?v=2) no-repeat 0 4px; font-size:10px"';
//paths
var me = $('.me .mainlink a');
var sidebar = $('#sidebar .container');
//hrefs
var likesPath = me.attr('href') + '/likes';
var commentsPath = me.attr('href') + '/comments';
var bothPath = me.attr('href') + '/discussion';
//some DOM manipulation
me.after('<br /><a href="' + bothPath + '"' + commentsStyle +'" class="commentsNlikes">Both</a>');
me.after('<br /><a href="' + likesPath + '"' + likesStyle +'" class="commentsNlikes">Likes</a>');
me.after('<br /><a href="' + commentsPath + '"' + commentsStyle +'" class="commentsNlikes">Comments</a>');
sidebar.css('position','fixed');
//override FF's default link click method
$('.commentsNlikes').bind("click", function(){
$(this).removeAttr('target');
});
