Hide SharePoint Toolbar June 2nd, 2016

/**************************************/
/* SUITE BAR DISPLAY FOR ADMIN OPT-IN */
/**************************************/
/* Setting the flag on the admin page */
$(window).load(function($){
 if(localStorage.getItem('suiteBar') === 'true'){
 jQuery('.message').html('SharePoint Suite Bar Status: ON');
 } else {
 jQuery('.message').html('SharePoint Suite Bar Status: OFF');
 }
 jQuery('.suite-bar-opt-in').click(function(){
 localStorage.setItem('suiteBar','true');
 jQuery('.message').html('SharePoint Suite Bar Status: ON');
 });
 jQuery('.suite-bar-opt-out').click(function(){
 localStorage.setItem('suiteBar','false');
 jQuery('.message').html('SharePoint Suite Bar Status: OFF');
 });
});
if(localStorage.getItem('suiteBar') === 'true'){
 jQuery('#ms-designer-ribbon').attr('style','display: block !important'); /* Need to use jQuery's .attr() method since the value in the .css() method can't handle the !important modifier which is needed to override the stylesheet. */
}