Index: active_tags.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/active_tags/active_tags.module,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 active_tags.module
--- active_tags.module	12 Sep 2008 17:05:03 -0000	1.2.2.1
+++ active_tags.module	12 Feb 2009 20:36:36 -0000
@@ -7,20 +7,6 @@
  */
 
 
-function active_tags_init() {
-  if (arg(2) == 'edit' || arg(1) == 'add') {
-    drupal_add_css(drupal_get_path('module', 'active_tags') .'/active_tags.css', 'module');
-    $settings = array();
-    foreach (taxonomy_get_vocabularies() as $id => $values) {
-      if (variable_get('active_tags_'. $id, 0) == 1) {
-        $settings[] = "#edit-taxonomy-tags-$id-wrapper";
-      } 
-    }
-    drupal_add_js(array('active_tags' => $settings), 'setting');
-    drupal_add_js(drupal_get_path('module', 'active_tags') .'/active_tags.js', 'module');
-  }
-}
-
 function active_tags_form_alter(&$form, $form_state, $form_id) { 
   if ($form_id == 'taxonomy_form_vocabulary') {
     $form['settings']['active_tags'] = array(
@@ -31,7 +17,22 @@
       '#description' => t('Swaps this vocabulary widget for an enhanced tag field if browser supports javascript.'), 
     );
     $form['#submit'][] = 'active_tags_form_vocabulary_submit';
-  } 
+  }
+  
+  if ($form['#id'] === 'node-form') {
+    $settings = array();
+    foreach (taxonomy_get_vocabularies() as $id => $values) {
+      if (variable_get('active_tags_'. $id, 0) == 1) {
+        $settings[] = "#edit-taxonomy-tags-$id-wrapper";
+      } 
+    }
+    // Only load files if we found active tags enabled fields
+    if ( ! empty($settings)) {
+      drupal_add_css(drupal_get_path('module', 'active_tags') .'/active_tags.css', 'module');
+      drupal_add_js(array('active_tags' => $settings), 'setting');
+      drupal_add_js(drupal_get_path('module', 'active_tags') .'/active_tags.js', 'module');
+    }
+  }
 }
 
 function active_tags_form_vocabulary_submit($form, &$form_state) {

