Skip to content

Instantly share code, notes, and snippets.

@ktskumar
Created February 24, 2020 17:31
Show Gist options
  • Save ktskumar/f7935e27da3eb18f32b60123f9a4baf0 to your computer and use it in GitHub Desktop.
Save ktskumar/f7935e27da3eb18f32b60123f9a4baf0 to your computer and use it in GitHub Desktop.
Identify whether the current page is a modern site page or not.
//Useful code when we writing the SharePoint Framework Extensions
var modernPage = false;
try{
if(window._isSPSitePage)
modernPage = true;
}catch(e){}
console.log("This is modern site page: "+ modernPage);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment