Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Once in a while various Drupal elements can be a real pain:

  • The context menu covers the search menu & prevents me from clicking into the text field
  • A co-worker is worried that the user is seeing things like 'Available Updates' notifications
  • View/Edit tabs and action links are present in screenshots

The easy answer is to log out and view the page again, but that's a pain when you just want to do a very quick thing.

What is a quick, easy way to jump in/out of Drupal?

share|improve this question
Use a second browser :) – Clive Apr 14 '14 at 17:45
That's simple, but not always easy. If I have to re-create the page state (filling out a form, etc) it can be pretty cumbersome. – doub1ejack Apr 14 '14 at 17:51
Yeah I was half kidding - cool script, I've bookmarked it – Clive Apr 14 '14 at 17:57

I put together a simple javascriptlet that I can click on to show/hide most admin elements. It is kind of a static solution (I'll need to update it periodically as new admin elements appear that need to be hidden), but it's simple. Works with the Admin-Menu module too.

Just make a new bookmark and paste this into the 'url' field:

javascript:(function($){ if( $('html').data('drupal_clutter_hidden') ){ $('html').data('drupal_clutter_hidden', false); $('#block-search-form').css('z-index', ''); if( $('html').data('drupal_has_adv_toolbar') ){$('body').addClass( $('html').data('drupal_has_adv_toolbar') );$('#admin-menu').show();$('html').removeData('drupal_has_adv_toolbar');} else {$('body').css('padding-top', '64px'); $('#toolbar').show(); }$('.alpha-grid-toggle, .alpha-block-toggle,em.placeholder, #messages, .krumo-root, ul.tabs.primary, .region-inner > .tabs, .contextual-links-wrapper').show(); } else { $('html').data('drupal_clutter_hidden', true); $('#block-search-form').css('z-index', '100'); if( $('body').hasClass('admin-menu') ){var classes = $('body').hasClass('admin-menu-with-shortcuts') ? 'admin-menu admin-menu-with-shortcuts' : 'admin-menu';$('html').data('drupal_has_adv_toolbar', classes); $('body').removeClass( $('html').data('drupal_has_adv_toolbar') );$('#admin-menu').hide();} else {$('body').css('padding-top', '0'); $('#toolbar').hide(); }$('.alpha-grid-toggle, .alpha-block-toggle,em.placeholder, #messages, .krumo-root, ul.tabs.primary, .region-inner > .tabs, .contextual-links-wrapper').hide(); } }(jQuery));

Before: enter image description here

After:enter image description here

share|improve this answer
I've added a more readable version of this function to a jsFiddle in case anyone (or me, down the road) wants to tweek it. – doub1ejack Apr 14 '14 at 18:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.