Thursday, June 3, 2010

Hide the Browse tab in Sharepoint 2010

After some customizations to our Sharepoint install, we had the need to hide the Browse tab. Since I had done some Ribbon customizations already, I thought this would be pretty easy. As it turns out the Browse tab is not actually part of the Ribbon (some Googling turned this up). So this meant getting creative with hiding this tab.

Here is the 2 prong solution I came up with, using CSS and jQuery:

1. In the corev4.css, I added the following at the very end of the document:

2. In the v4.master, I added the following jQuery:
<script type="text/javascript">
  $(document).ready(function() {
    $('span').filter(function(){return $(this).text() == "Browse";}).parent().parent().hide();

Now the Browse tab is hidden.

1 comment: