Skip to content

Instantly share code, notes, and snippets.

@baywet
Created June 14, 2016 21:07
Show Gist options
  • Save baywet/8fbb587023f306ee40bad00b3a23961a to your computer and use it in GitHub Desktop.
Save baywet/8fbb587023f306ee40bad00b3a23961a to your computer and use it in GitHub Desktop.
code sample to determine if the current document library is being used with new experience or not
function getIsLibraryNewExperience(){
var keyPairs = document.cookie.split('; ');
for(var kpIdx in keyPairs){
var parts = keyPairs[kpIdx].split('=');
if(parts[0] === 'splnu' && parts[1] === '1'){
return true;
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment