Index: javascript_aggregator.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/javascript_aggregator/Attic/javascript_aggregator.module,v
retrieving revision 1.16.2.11
diff -u -u -p -r1.16.2.11 javascript_aggregator.module
--- javascript_aggregator.module	23 May 2009 15:25:59 -0000	1.16.2.11
+++ javascript_aggregator.module	28 Jul 2009 11:18:35 -0000
@@ -122,7 +122,9 @@ EOT;
     }
 
 		// Adds excluded files again to the $scripts variable, making sure the aggregated file is on top.
-    array_unshift($scripts_js_links, base_path() . $jsfile);
+    $base_path = variable_get('javascript_aggregator_base_path', NULL);
+    $base_path = $base_path ? $base_path : base_path();
+    array_unshift($scripts_js_links, $base_path . $jsfile);
     foreach ($scripts_js_links as $add_to_scripts) {
       $script_links .= "<script type=\"text/javascript\" src=\"$add_to_scripts\"></script>\n";
     }
@@ -194,6 +196,13 @@ function javascript_aggregator_form_alte
       '#disabled' => !$is_writable,
       '#description' => t('Enter one js file per line that should be excluded from js aggregation. Check your HTML source for paths. TinyMCE Example: <em>/sites/all/modules/tinymce/tinymce/jscripts/tiny_mce/tiny_mce.js</em> Partial paths are also possible, this does the same <em>tiny_mce.js</em>'),
     );
+    
+    $form['javascript_aggregation']['javascript_aggregator_base_path'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Advanced: Base URL for javascript aggregated files'),
+      '#default_value' => variable_get('javascript_aggregator_base_path', ''),
+      '#description' => t('If you would like to serve your JS files from a different server, like one dedicated for static files (usually images and JS files), add its URL here, like <em>http://images.example.com/</em>. Make sure it ends with a slash. Leave empty if you want JS files to be served from the same server and directory as they are created in'),
+    );
   }
 }
 
