From cde5a17e358011d3cb0bbf975bc65c39dead9485 Mon Sep 17 00:00:00 2001 From: Raghav Sharma <118168183+sharmrj@users.noreply.github.com> Date: Thu, 26 Sep 2024 20:10:57 +0530 Subject: [PATCH] MWPW-155489 [PEP] Add device type as PEP criteria (#2931) PEP now checks if the the useragent is one of a number of mobile devices. --- libs/blocks/global-navigation/global-navigation.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/blocks/global-navigation/global-navigation.js b/libs/blocks/global-navigation/global-navigation.js index 9126740c39..72777e5c92 100644 --- a/libs/blocks/global-navigation/global-navigation.js +++ b/libs/blocks/global-navigation/global-navigation.js @@ -639,9 +639,12 @@ class Gnav { const state = getMetadata('app-prompt')?.toLowerCase(); const entName = getMetadata('app-prompt-entitlement')?.toLowerCase(); const promptPath = getMetadata('app-prompt-path')?.toLowerCase(); + const hasMobileUA = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Touch/i.test(navigator.userAgent); + if (state === 'off' || !window.adobeIMS?.isSignedInUser() || !isDesktop.matches + || hasMobileUA || !entName?.length || !promptPath?.length) return;