var projectOwner = null;
var projectSlug = null;
var alreadyStarred = false;

var KEY_T = 84;

$(function() {
    // setup star button
    var increment = alreadyStarred ? -1 : 1;
    $('.btn-star').click(function() {
        var starred = $(this).find('.starred');
        starred.html(' ' + (parseInt(starred.text()) + increment).toString());
        $.ajax('/' + projectOwner + '/' + projectSlug + '/star/' + (increment > 0));

        var icon = $('#icon-star');
        if (increment > 0) {
            icon.removeClass('fa-star-o').addClass('fa-star');
        } else {
            icon.removeClass('fa-star').addClass('fa-star-o');
        }

        increment *= -1;
    });

    var body = $('body');
    body.keydown(function(event) {
        var target = $(event.target);
        if (target.is('body')) {
            switch (event.keyCode) {
                case KEY_T:
                    event.preventDefault();
                    var navBar = $('.project-navbar');
                    var activeTab = navBar.find('li.active');
                    var nextTab = activeTab.next();
                    var nextId = nextTab.attr('id');
                    if (nextTab.is('li') && nextId !== 'issues' && nextId !== 'source') {
                        window.location = nextTab.find('a').attr('href');
                    } else {
                        window.location = navBar.find('li:first').find('a').attr('href');
                    }
                    break;
                default:
                    break;
            }
        }
    });
});

@@ -83,15 +83,373 @@
 KEY_
-T = 84;
+PLUS = 61;%0Avar KEY_MINUS = 173;%0A%0Afunction getActiveTab() %7B%0A    return $('.project-navbar').find('li.active');%0A%7D%0A%0Afunction switchTabTo(tab, def) %7B%0A    var id = tab.attr('id');%0A    if (tab.is('li') && id !== 'issues' && id !== 'source') %7B%0A        window.location = tab.find('a').attr('href');%0A    %7D else %7B%0A        window.location = def.find('a').attr('href');%0A    %7D%0A%7D
 %0A%0A$(
@@ -1163,24 +1163,71 @@
 ('body')) %7B%0A
+            var navBar = $('.project-navbar');%0A
             
@@ -1276,17 +1276,20 @@
 ase KEY_
-T
+PLUS
 :%0A      
@@ -1350,78 +1350,42 @@
     
-var navBar = $('.project-navbar');%0A                    var activeTab =
+switchTabTo(getActiveTab().next(),
  nav
@@ -1396,25 +1396,25 @@
 find('li
-.active
+:first
 ')
+)
 ;%0A      
@@ -1431,327 +1431,145 @@
     
-var nextTab = activeTab.next();%0A                    var nextId = nextTab.attr('id');%0A                    if (nextTab.is('li') && nextId !== 'issues' && nextId !== 'source') %7B%0A                        window.location = nextTab.find('a').attr('href');%0A                    %7D else %7B%0A                        window.location =
+break;%0A                case KEY_MINUS:%0A                    event.preventDefault();%0A                    switchTabTo(getActiveTab().prev(),
  nav
@@ -1585,61 +1585,16 @@
 'li:
-fir
+la
 st')
-.find('a').attr('href');%0A                    %7D
+);
 %0A   

Change tab hotkey to + and -