-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(headless-react): add strings stating the beta status of ssr comm…
…erce (#4960) https://coveord.atlassian.net/browse/DOC-16522 The `(Open Beta)` string will appear in titles for everything under `SSR Commerce`. ![Screenshot 2025-02-12 at 9 32 43 AM](https://github.com/user-attachments/assets/8ae91295-7421-4f7f-a022-4c854e197563)
- Loading branch information
Showing
4 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export function insertBetaNote() { | ||
document.addEventListener('DOMContentLoaded', () => { | ||
const breadcrumbs = document.querySelector('ul.tsd-breadcrumb'); | ||
if (breadcrumbs) { | ||
const IsSSRCommercePage = Array.from( | ||
breadcrumbs.querySelectorAll('a') | ||
).find((link) => link.textContent?.trim() === 'SSR Commerce'); | ||
|
||
if (IsSSRCommercePage) { | ||
const h1Element = document.querySelector('h1'); | ||
if (h1Element) { | ||
h1Element.textContent += ' (Open Beta)'; | ||
} | ||
} | ||
} | ||
}); | ||
} |