3 let bodyHasMobileEmbeddedClass;
6 * Returns true if the page is embedded in native mobile app.
7 * (.mobile-embedded CSS class on body was added there during
8 * generating assets in build-scripts/render-embedded-chat.js)
10 module.exports = () => {
11 if (bodyHasMobileEmbeddedClass === undefined) {
12 bodyHasMobileEmbeddedClass = document.body.classList.contains('mobile-embedded');
15 return bodyHasMobileEmbeddedClass;