Quick Tip:Toggle SharePoint 2013/O365 SharePoint Sites Full Screen Mode with JavaScript

This is just a quick little snippet you can add to a SharePoint 2013/O365 SharePoint Site to automatically turn on Full Screen Mode when you load a page within the site and how to turn it back off when you exit that page.

If you look near the top of the ribbon, you will see a little icon that allows you to Focus Content. This icon simply calls a JavaScript function to toggle some CSS classes so the visitor gets a focused view of the content. This function can be used in your own calls to help highlight content on a page when the page loads.


This following snippet can be placed into a script editor web part and will cause the screen to go to focused mode when the content is loaded. When the visitor navigates away from the page, they will be returned to a non-focused view of the content.

window.addEventListener('unload',function() {

window.addEventListener('load',function() {

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s