use shift-home instead to take you home

This commit is contained in:
Friendika 2011-01-04 14:35:12 -08:00
parent 64628c800d
commit 45d8676dc2
2 changed files with 12 additions and 4 deletions

View file

@ -44,11 +44,12 @@
$('#pause').html(''); $('#pause').html('');
} }
} }
if(event.keyCode == '36') { if(event.keyCode == '36' && event.shiftKey == true) {
if(homebase !== undefined) {
event.preventDefault(); event.preventDefault();
if(homebase)
document.location = homebase; document.location = homebase;
} }
}
}); });
}); });

View file

@ -173,8 +173,15 @@ if($a->module_loaded) {
} }
// let javascript take you home
if(x($_SESSION,'visitor_home')) if(x($_SESSION,'visitor_home'))
$a->page['content'] .= '<script>var homebase="' . $_SESSION['visitor_home'] . '" ; </script>'; $homebase = $_SESSION['visitor_home'];
elseif(local_user())
$homebase = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
if(isset($homebase))
$a->page['content'] .= '<script>var homebase="' . $homebase . '" ; </script>';
if(stristr($_SESSION['sysmsg'], t('Permission denied'))) { if(stristr($_SESSION['sysmsg'], t('Permission denied'))) {
header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.')); header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.'));