You are here

function mobile_tools_page_alter in Mobile Tools 7.2

Implementation of hook_alter()

File

./mobile_tools.module, line 139
Functionality to ease the creation of mixed device environments.

Code

function mobile_tools_page_alter(&$page) {
  $site = mobile_tools_get_active_device_group();
  if (variable_get('mobile_tools_hide_address_bar', TRUE) && $site == MOBILE_TOOLS_SITE_TYPE_MOBILE) {

    // @todo find a way to make this script overridable for modules like jQuery Mobile
    // where the load event isn't sufficient
    drupal_add_js(drupal_get_path('module', 'mobile_tools') . '/assets/js/mobile_tools_hide_address_bar.js', array(
      'type' => 'file',
      'scope' => 'footer',
    ));
  }
}