Created
February 24, 2020 17:31
-
-
Save ktskumar/f7935e27da3eb18f32b60123f9a4baf0 to your computer and use it in GitHub Desktop.
Identify whether the current page is a modern site page or not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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