diff --git a/admin_menu.module b/admin_menu.module
index 8744ba4..cd90332 100644
--- a/admin_menu.module
+++ b/admin_menu.module
@@ -134,14 +134,9 @@ function admin_menu_menu_link_delete($link) {
 }
 
 /**
- * Implements hook_init().
- *
- * We can't move this into admin_menu_footer(), because PHP-only based themes
- * like chameleon load and output scripts and stylesheets in front of
- * theme_closure(), so we ensure Admin menu's styles and scripts are loaded on
- * all pages via hook_init().
+ * Implements hook_page_build().
  */
-function admin_menu_init() {
+function admin_menu_page_build(&$page) {
   if (!user_access('access administration menu') || admin_menu_suppress(FALSE)) {
     return;
   }
@@ -150,17 +145,23 @@ function admin_menu_init() {
     return;
   }
   global $user, $language;
-
   $path = drupal_get_path('module', 'admin_menu');
-  drupal_add_css($path . '/admin_menu.css');
+
+  $page['page_bottom']['admin_menu'] = array(
+    '#markup' => admin_menu_output(),
+    '#attached' => array(),
+  );
+  $attached = &$page['page_bottom']['admin_menu']['#attached'];
+
+  $attached['css'][] = $path . '/admin_menu.css';
   if ($user->uid == 1) {
-    drupal_add_css($path . '/admin_menu.uid1.css');
+    $attached['css'][] = $path . '/admin_menu.uid1.css';
   }
   // Previous versions used the 'defer' attribute to increase browser rendering
   // performance. At least starting with Firefox 3.6, deferred .js files are
   // loaded, but Drupal.behaviors are not contained in the DOM when drupal.js
   // executes Drupal.attachBehaviors().
-  drupal_add_js($path . '/admin_menu.js');
+  $attached['js'][] = $path . '/admin_menu.js';
 
   // Destination query strings are applied via JS.
   $settings['destination'] = drupal_http_build_query(drupal_get_destination());
@@ -193,7 +194,10 @@ function admin_menu_init() {
     // In fixed positioning, supply a callback function for tableheader.js to
     // allow it to determine the top viewport offset.
     // @see admin_menu.js, toolbar.js
-    drupal_add_js(array('tableHeaderOffset' => 'Drupal.admin.height'), 'setting');
+    $attached['js'][] = array(
+      'data' => array('tableHeaderOffset' => 'Drupal.admin.height'),
+      'type' => 'setting',
+    );
   }
   if ($setting = variable_get('admin_menu_tweak_tabs', 0)) {
     $settings['tweak_tabs'] = $setting;
@@ -205,7 +209,10 @@ function admin_menu_init() {
     $settings['tweak_permissions'] = variable_get('admin_menu_tweak_permissions', 0);
   }
 
-  drupal_add_js(array('admin_menu' => $settings), 'setting');
+  $attached['js'][] = array(
+    'data' => array('admin_menu' => $settings),
+    'type' => 'setting',
+  );
 }
 
 /**
@@ -231,15 +238,6 @@ function admin_menu_suppress($set = TRUE) {
 }
 
 /**
- * Implements hook_page_alter().
- */
-function admin_menu_page_alter(&$page) {
-  $page['page_bottom']['admin_menu'] = array(
-    '#markup' => admin_menu_output(),
-  );
-}
-
-/**
  * Implements hook_js().
  */
 function admin_menu_js() {
diff --git a/admin_menu_toolbar/admin_menu_toolbar.module b/admin_menu_toolbar/admin_menu_toolbar.module
index 9c04b26..97d665b 100644
--- a/admin_menu_toolbar/admin_menu_toolbar.module
+++ b/admin_menu_toolbar/admin_menu_toolbar.module
@@ -8,22 +8,17 @@
  */
 
 /**
- * Implementation of hook_init().
- *
- * @todo Add another admin_menu hook to avoid cluttering hook_init().
+ * Implementation of hook_page_build().
  */
-function admin_menu_toolbar_init() {
-  if (!user_access('access administration menu') || admin_menu_suppress(FALSE)) {
-    return;
-  }
-  // Performance: Skip this entirely for AJAX requests.
-  if (strpos($_GET['q'], 'js/') === 0) {
+function admin_menu_toolbar_page_build(&$page) {
+  if (!isset($page['page_bottom']['admin_menu'])) {
     return;
   }
   $path = drupal_get_path('module', 'admin_menu_toolbar');
-  drupal_add_css($path . '/admin_menu_toolbar.css', array('preprocess' => FALSE));
-  // Performance: Defer execution.
-  drupal_add_js($path . '/admin_menu_toolbar.js', array('defer' => TRUE));
+  $attached = &$page['page_bottom']['admin_menu']['#attached'];
+
+  $attached['css'][] = $path . '/admin_menu_toolbar.css';
+  $attached['js'][] = $path . '/admin_menu_toolbar.js';
 
   $settings = array();
   // Add current path to support menu item highlighting.
@@ -35,7 +30,11 @@ function admin_menu_toolbar_init() {
   elseif (drupal_is_front_page()) {
     $settings['activeTrail'] = url('<front>');
   }
-  drupal_add_js(array('admin_menu' => array('toolbar' => $settings)), 'setting');
+
+  $attached['js'][] = array(
+    'data' => array('admin_menu' => array('toolbar' => $settings)),
+    'type' => 'setting',
+  );
 }
 
 /**
