diff --git a/include/main.js b/include/main.js
index d137d4c9c6..5c4363690a 100644
--- a/include/main.js
+++ b/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;
+ }
}
});
});
diff --git a/index.php b/index.php
index cbc85accf4..456c0a1443 100644
--- a/index.php
+++ b/index.php
@@ -173,8 +173,15 @@ if($a->module_loaded) {
}
+// let javascript take you home
+
if(x($_SESSION,'visitor_home'))
- $a->page['content'] .= '';
+ $homebase = $_SESSION['visitor_home'];
+elseif(local_user())
+ $homebase = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
+
+if(isset($homebase))
+ $a->page['content'] .= '';
if(stristr($_SESSION['sysmsg'], t('Permission denied'))) {
header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.'));