My module needs to also preprocess the JS attributes and run AFTER jQuery Update, but when it does it wipes out jQuery Update's replacements. I have added this ONE line code in the jquery_update.module, line 83:

function jquery_update_preprocess_page(&$variables) {
-------- CODE -----------
+     $variables['js'] = $scripts;
       $variables['scripts'] = drupal_get_js('header', $scripts);
    }
  }
}

By assigning: $variables['js'] = $scripts; This allows me to use the JS array you modified. For those who do not have jQuery Update installed, I use this code to load the Drupal's JS array if $variables['js'] doesn't exist.

  if (!isset($variables['js'])) {
    $variables['js'] = drupal_add_js();
  }
  $javascript = $variables['js'];

Comments

markhalliwell’s picture

The module I am referring to is Browser Theme Settings.

markhalliwell’s picture

Status: Active » Closed (duplicate)
klonos’s picture

subscribing...