Skip to content

Instantly share code, notes, and snippets.

@mavimo
Created December 30, 2017 18:17
Show Gist options
  • Save mavimo/8e8bfd3e7856aa0b47821cf145bfab81 to your computer and use it in GitHub Desktop.
Save mavimo/8e8bfd3e7856aa0b47821cf145bfab81 to your computer and use it in GitHub Desktop.
/**
 * Implements hook_js_alter().
 */
function THEME_NAME_js_alter(&$javascript) {
 foreach ($javascript as &$script) {
  $script[‘weight’] += $script[‘group’];
 $script[‘group’] = JS_DEFAULT;
 $script[‘every_page’] = TRUE;
 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment