]> git.mxchange.org Git - friendica.git/commitdiff
use shift-home instead to take you home
authorFriendika <info@friendika.com>
Tue, 4 Jan 2011 22:35:12 +0000 (14:35 -0800)
committerFriendika <info@friendika.com>
Tue, 4 Jan 2011 22:35:12 +0000 (14:35 -0800)
include/main.js
index.php

index d137d4c9c6a9201d840cff6528bc1595b8467eb8..5c4363690a11be888aa928a4dc3538da5f3d001e 100644 (file)
                                        $('#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;
+                               }
                        }
                });                                     
        });
index cbc85accf47e6570cf11e8e18205a2bf5e70ac03..456c0a144335ec68e1a1936a698fff2af311a18d 100644 (file)
--- 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.'));