From 5d6f9bf550d0df50fa9bcf090fd2788c7a91f0e6 Mon Sep 17 00:00:00 2001 From: renmin Date: Thu, 2 Mar 2023 09:33:40 +0800 Subject: [PATCH] Update explainer.md refine the UA sample code format. --- SidePanel/explainer.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SidePanel/explainer.md b/SidePanel/explainer.md index a3736955..8f8787f1 100644 --- a/SidePanel/explainer.md +++ b/SidePanel/explainer.md @@ -104,11 +104,11 @@ side panel by using Client Hints. The developer can use the `Sec-CH-UA` header or `navigator.userAgentData.brands` to detect if the web application is being displayed in the side panel. - ```javascript - if (navigator.userAgentData.brands.some(brand => brand.brand === 'EdgeSidePanel')) { - // The web application is being displayed in the side panel. - } - ``` +```javascript +if (navigator.userAgentData.brands.some(brand => brand.brand === 'EdgeSidePanel')) { + // The web application is being displayed in the side panel. +} +``` ## Alternatives Considered