| 1 |
// `pagenow` is only defined inside wp-admin. This module is also reached from |
| 2 |
// the admin bar bundle, which loads on the front end, so read it defensively. |
| 3 |
export const isNetworkAdmin = (): boolean => |
| 4 |
true === window.pagenow?.endsWith('-network') |
| 5 |
|
| 6 |
export const isMacOS = (): boolean => |
| 7 |
null !== /mac/i.exec(window.navigator.userAgent) |
| 8 |
|
| 9 |
export const isLicensed = (): boolean => |
| 10 |
!!window.CODE_SNIPPETS?.isLicensed |
| 11 |
|
| 12 |
export const shouldShowUpsell = () => |
| 13 |
!isLicensed() && !window.CODE_SNIPPETS?.hideUpsell |
| 14 |
|