4

I am using Office 365 SharePoint site and I would like to set the ribbon to always be visible.

When I go to a document library its hidden by default, when I select a file two tabs show 'Files' and 'Library' I then have to click on one of the tabs to see the commands in the ribbon

I would like it so when I go to any libraries /lists the ribbon is visible and I can see the commands.

enter image description here

How would I do this?

EDIT = Script editor with code

enter image description here

<script type="text/javascript">
$(document).ready(function(){

try{
  var tabs=document.querySelectorAll("li[role='tab']"),    //all tabs, see mum, No jQuery!
  tabid=tabs[1].id,    //second tab
  tabname=tabid.split('-title')[0];    //disregard the last part of the id
  console && console.info('opening tab:',tabname);
  SelectRibbonTab(tabname);    //standard SP function from init.js 
}
catch(e){}    //ignore any errors, sloppy coding but SP also uses this all over the place

});
</script>
2

All tabs are identified by names like Ribbon.Read Ribbon.WikiTabPage;
you can check the HTML source

Pages, TaskList, List, Library Tabs all have different names

This code (I did not include the wait for pageload) just opens the second tab:

try{
 var tabs=document.querySelectorAll("li[role='tab']"),//all tabs, see mum, No jQuery!
     tabid=tabs[1].id,//second tab
     tabname=tabid.split('-title')[0];//disregard the last part of the id
  console && console.info('opening tab:',tabname);
  SelectRibbonTab(tabname);//standard SP function from init.js 
}catch(e){}//ignore any errors, sloppy coding but SP also uses this all over the place

If you want more advanced interactions with the Ribbon:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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