? syntaxhighlighter-undefined-v2.patch
? syntaxhighlighter-undefined-v3.patch
? syntaxhighlighter-undefined-v4-d7style.patch
? syntaxhighlighter-undefined.patch
Index: syntaxhighlighter.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/syntaxhighlighter/syntaxhighlighter.js,v
retrieving revision 1.1
diff -u -p -r1.1 syntaxhighlighter.js
--- syntaxhighlighter.js	6 Dec 2009 09:41:29 -0000	1.1
+++ syntaxhighlighter.js	6 Dec 2009 16:14:40 -0000
@@ -12,8 +12,17 @@
  * Core behavior for syntaxHighlighter.
  *
  */
-Drupal.behaviors.syntaxhighlighter = function(context) {
+ 
+(function ($) {
 
+Drupal.behaviors.syntaxhighlighter = function(context) {
+  // Initialize settings.
+  Drupal.settings.syntaxhighlighter = $.extend({
+    tagname: false,
+    clipboard: false,
+    legacy_mode: false,
+  }, Drupal.settings.syntaxhighlighter || {});
+  
   if ($('body:not(.syntaxhighlighter-processed)', context).length) {
     SyntaxHighlighter.config.strings.expandSource = Drupal.t('expand source');
     SyntaxHighlighter.config.strings.viewSource = Drupal.t('view source');
@@ -26,11 +35,11 @@ Drupal.behaviors.syntaxhighlighter = fun
     SyntaxHighlighter.config.strings.noBrush = Drupal.t('Can\'t find brush for: ');
     SyntaxHighlighter.config.strings.brushNotHtmlScript = Drupal.t('Brush wasn\'t made for html-script option: ');
 
-    if (Drupal.settings.syntaxhighlighter.tagname != undefined) {
+    if (Drupal.settings.syntaxhighlighter.tagname) {
       SyntaxHighlighter.config.tagName = Drupal.settings.syntaxhighlighter.tagname;
     }
 
-    if (Drupal.settings.syntaxhighlighter.clipboard != undefined) {
+    if (Drupal.settings.syntaxhighlighter.clipboard) {
       SyntaxHighlighter.config.clipboardSwf = Drupal.settings.syntaxhighlighter.clipboard;
     }
     $('body:not(.syntaxhighlighter-processed)', context).addClass('syntaxhighlighter-processed');
@@ -42,3 +51,4 @@ Drupal.behaviors.syntaxhighlighter = fun
   }
 };
 
+})(jQuery);
Index: syntaxhighlighter.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/syntaxhighlighter/syntaxhighlighter.module,v
retrieving revision 1.34
diff -u -p -r1.34 syntaxhighlighter.module
--- syntaxhighlighter.module	6 Dec 2009 09:49:11 -0000	1.34
+++ syntaxhighlighter.module	6 Dec 2009 16:14:40 -0000
@@ -68,9 +68,6 @@ function syntaxhighlighter_init() {
       drupal_add_js($scripts_path . $lang, 'module');
     }
   }
-
-  // Performance: Defer execution.
-  drupal_add_js(drupal_get_path('module', 'syntaxhighlighter') .'/syntaxhighlighter.min.js', 'module', 'header');
   
   $tag_name = variable_get('syntaxhighlighter_tagname', 'pre');
   if ($tag_name !== 'pre') {
@@ -88,6 +85,8 @@ function syntaxhighlighter_init() {
   if ($setting = variable_get('syntaxhighlighter_default_expressions', '')) {
     drupal_add_js($setting, 'inline');
   }
+  
+  drupal_add_js(drupal_get_path('module', 'syntaxhighlighter') .'/syntaxhighlighter.js', 'module', 'header');
 }
 
 
