Browse Source

use shift-home instead to take you home

pull/1/head
Friendika 11 years ago
parent
commit
45d8676dc2
  1. 7
      include/main.js
  2. 9
      index.php

7
include/main.js

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

9
index.php

@ -173,8 +173,15 @@ if($a->module_loaded) {
}
// let javascript take you 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'))) {
header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.'));

Loading…
Cancel
Save