Skip to content

Instantly share code, notes, and snippets.

@iamcarrico
Created July 16, 2014 19:50
Show Gist options
  • Save iamcarrico/eedef182edfe5fd32c5d to your computer and use it in GitHub Desktop.
Save iamcarrico/eedef182edfe5fd32c5d to your computer and use it in GitHub Desktop.
Silly way to add a redirect
name = Your module name
description = Just adds that incredibly silly mobile redirect code.
core = 7.x
version = 7.x-1.0
<?php
/**
* Implements hook_page_build().
*/
function your_module_page_build() {
if (drupal_is_front_page()) {
drupal_add_js('http://example.com/example.js', 'external');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment