Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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