aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/community.php2
-rw-r--r--mod/contacts.php2
-rw-r--r--mod/directory.php2
-rw-r--r--mod/message.php2
-rw-r--r--mod/network.php2
-rw-r--r--mod/notifications.php2
-rw-r--r--mod/profile.php2
-rw-r--r--mod/profiles.php2
-rw-r--r--mod/settings.php2
9 files changed, 9 insertions, 9 deletions
diff --git a/mod/community.php b/mod/community.php
index cf43598b5..f8bd88d86 100644
--- a/mod/community.php
+++ b/mod/community.php
@@ -25,7 +25,7 @@ function community_content(&$a, $update = 0) {
$o .= '<h3>' . t('Community') . '</h3>';
if(! $update) {
- $o .= '<script> $(document).ready(function() { $(\'#nav-community-link\').addClass(\'nav-selected\'); });</script>';
+ $o .= set_nav_selected('nav-community-link');
$o .= '<div id="live-community"></div>' . "\r\n";
$o .= "<script> var profile_uid = -1; var netargs = '/?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
}
diff --git a/mod/contacts.php b/mod/contacts.php
index 2fc01a0d8..1fa07688c 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -112,7 +112,7 @@ function contacts_content(&$a) {
$sort_type = 0;
$o = '';
- $o .= '<script> $(document).ready(function() { $(\'#nav-contacts-link\').addClass(\'nav-selected\'); });</script>';
+ $o .= set_nav_selected('nav-contacts-link');
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
diff --git a/mod/directory.php b/mod/directory.php
index 0c60f04bf..03b6ab4d1 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -22,7 +22,7 @@ function directory_content(&$a) {
}
$o = '';
- $o .= '<script> $(document).ready(function() { $(\'#nav-directory-link\').addClass(\'nav-selected\'); });</script>';
+ $o .= set_nav_selected('nav-directory-link');
if(x($_SESSION,'theme'))
unset($_SESSION['theme']);
diff --git a/mod/message.php b/mod/message.php
index ad598eb7d..ff3db06e2 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -110,7 +110,7 @@ function message_post(&$a) {
function message_content(&$a) {
$o = '';
- $o .= '<script> $(document).ready(function() { $(\'#nav-messages-link\').addClass(\'nav-selected\'); });</script>';
+ $o .= set_nav_selected('nav-messages-link');
if(! local_user()) {
notice( t('Permission denied.') . EOL);
diff --git a/mod/network.php b/mod/network.php
index 7bdd3f3f1..8d377fa0e 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -98,7 +98,7 @@ function network_content(&$a, $update = 0) {
}
}
- $o .= '<script> $(document).ready(function() { $(\'#nav-network-link\').addClass(\'nav-selected\'); });</script>';
+ $o .= set_nav_selected('nav-network-link');
$_SESSION['return_url'] = $a->cmd;
diff --git a/mod/notifications.php b/mod/notifications.php
index c6f073058..6f9ece184 100644
--- a/mod/notifications.php
+++ b/mod/notifications.php
@@ -64,7 +64,7 @@ function notifications_content(&$a) {
}
$o = '';
- $o .= '<script> $(document).ready(function() { $(\'#nav-notify-link\').addClass(\'nav-selected\'); });</script>';
+ $o .= set_nav_selected("nav-notifications-link");
if(($a->argc > 1) && ($a->argv[1] == 'all'))
$sql_extra = '';
diff --git a/mod/profile.php b/mod/profile.php
index f4b6bfaf1..7e47c91bb 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -70,7 +70,7 @@ function profile_content(&$a, $update = 0) {
}
else {
if($a->profile['profile_uid'] == local_user())
- $o .= '<script> $(document).ready(function() { $(\'#nav-home-link\').addClass(\'nav-selected\'); });</script>';
+ $o .= set_nav_selected('nav-home-link');
}
$contact = null;
diff --git a/mod/profiles.php b/mod/profiles.php
index 160ca13bc..7041249e2 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -220,7 +220,7 @@ function profiles_post(&$a) {
function profiles_content(&$a) {
$o = '';
- $o .= '<script> $(document).ready(function() { $(\'#nav-profiles-link\').addClass(\'nav-selected\'); });</script>';
+ $o .= set_nav_selected('nav-profiles-link');
if(! local_user()) {
notice( t('Permission denied.') . EOL);
diff --git a/mod/settings.php b/mod/settings.php
index 1b4098de8..0223b1b9c 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -299,7 +299,7 @@ if(! function_exists('settings_content')) {
function settings_content(&$a) {
$o = '';
- $o .= '<script> $(document).ready(function() { $(\'#nav-settings-link\').addClass(\'nav-selected\'); });</script>';
+ $o .= set_nav_selected('nav-settings-link');
if(! local_user()) {
notice( t('Permission denied.') . EOL );