{"id":4056,"date":"2016-06-02T13:15:20","date_gmt":"2016-06-02T17:15:20","guid":{"rendered":"http:\/\/webninjataylor.com\/library\/?p=4056"},"modified":"2016-06-02T13:15:20","modified_gmt":"2016-06-02T17:15:20","slug":"hide-sharepoint-toolbar","status":"publish","type":"post","link":"https:\/\/webninjataylor.com\/library\/hide-sharepoint-toolbar\/","title":{"rendered":"Hide SharePoint Toolbar"},"content":{"rendered":"<pre>\/**************************************\/\r\n\/* SUITE BAR DISPLAY FOR ADMIN OPT-IN *\/\r\n\/**************************************\/\r\n\/* Setting the flag on the admin page *\/\r\n$(window).load(function($){\r\n if(localStorage.getItem('suiteBar') === 'true'){\r\n jQuery('.message').html('SharePoint Suite Bar Status: ON');\r\n } else {\r\n jQuery('.message').html('SharePoint Suite Bar Status: OFF');\r\n }\r\n jQuery('.suite-bar-opt-in').click(function(){\r\n localStorage.setItem('suiteBar','true');\r\n jQuery('.message').html('SharePoint Suite Bar Status: ON');\r\n });\r\n jQuery('.suite-bar-opt-out').click(function(){\r\n localStorage.setItem('suiteBar','false');\r\n jQuery('.message').html('SharePoint Suite Bar Status: OFF');\r\n });\r\n});\r\nif(localStorage.getItem('suiteBar') === 'true'){\r\n 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. *\/\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/**************************************\/ \/* SUITE BAR DISPLAY FOR ADMIN OPT-IN *\/ \/**************************************\/ \/* Setting the flag on the admin page *\/ $(window).load(function($){ if(localStorage.getItem(&#8216;suiteBar&#8217;) === &#8216;true&#8217;){ jQuery(&#8216;.message&#8217;).html(&#8216;SharePoint Suite Bar Status: ON&#8217;); } else { jQuery(&#8216;.message&#8217;).html(&#8216;SharePoint Suite Bar Status: OFF&#8217;); } jQuery(&#8216;.suite-bar-opt-in&#8217;).click(function(){ localStorage.setItem(&#8216;suiteBar&#8217;,&#8217;true&#8217;); jQuery(&#8216;.message&#8217;).html(&#8216;SharePoint Suite Bar Status: ON&#8217;); }); jQuery(&#8216;.suite-bar-opt-out&#8217;).click(function(){ localStorage.setItem(&#8216;suiteBar&#8217;,&#8217;false&#8217;); jQuery(&#8216;.message&#8217;).html(&#8216;SharePoint Suite Bar Status: OFF&#8217;); }); }); if(localStorage.getItem(&#8216;suiteBar&#8217;) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[144],"tags":[9,150],"class_list":["post-4056","post","type-post","status-publish","format-standard","hentry","category-web-shots","tag-javascript","tag-sharepoint"],"_links":{"self":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/4056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/comments?post=4056"}],"version-history":[{"count":1,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/4056\/revisions"}],"predecessor-version":[{"id":4057,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/4056\/revisions\/4057"}],"wp:attachment":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/media?parent=4056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/categories?post=4056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/tags?post=4056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}