Index: menu_bar.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/menu_bar/menu_bar.module,v retrieving revision 1.3 diff -u -r1.3 menu_bar.module --- menu_bar.module 18 Nov 2006 01:26:44 -0000 1.3 +++ menu_bar.module 14 Dec 2006 02:46:34 -0000 @@ -32,13 +32,17 @@ // We put this in !$may_cache so it's only added once per request elseif (user_access('view menu bar')) { - $path = drupal_get_path('module', 'menu_bar'); - drupal_add_css($path .'/menu_bar.css'); - - // pass in base path to the JS file - // url() handles appending ?q= but in this case, we need to pass in the variable so the menus work when mod_rewrite is off - drupal_add_js(array('menu_bar' => array('basePath' => base_path() . (variable_get('clean_url', 0) ? '' : '?q='))), 'setting'); - drupal_add_js($path .'/menu_bar.js'); + static $script_added = FALSE; + if (!$script_added) { + $script_added = TRUE; + $path = drupal_get_path('module', 'menu_bar'); + drupal_add_css($path .'/menu_bar.css'); + + // pass in base path to the JS file + // url() handles appending ?q= but in this case, we need to pass in the variable so the menus work when mod_rewrite is off + drupal_add_js(array('menu_bar' => array('basePath' => base_path() . (variable_get('clean_url', 0) ? '' : '?q='))), 'setting'); + drupal_add_js($path .'/menu_bar.js'); + } } return $items;