Skip to content

Instantly share code, notes, and snippets.

@JonMcL
Last active December 20, 2015 11:29
Show Gist options
  • Save JonMcL/6123443 to your computer and use it in GitHub Desktop.
Save JonMcL/6123443 to your computer and use it in GitHub Desktop.
Simple Javascript to disable Drupal Overlay for admin_menu toolbar. Add to page with a hook_page_preproces.
(function ($) {
// Don't use Overlay module for the admin menu (toolbar) links
Drupal.admin.behaviors.overlay_exclude = function (context, settings, $adminMenu) {
$adminMenu.not('.overlay-exclude-processed')
.addClass('overlay-exclude-processed')
.find('a').addClass('overlay-exclude');
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment