aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/main.js7
-rw-r--r--index.php9
2 files changed, 12 insertions, 4 deletions
diff --git a/include/main.js b/include/main.js
index 94348a682..fcd1d6fee 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 cbc85accf..456c0a144 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'] .= '<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.'));