Skip to content

Commit 3c56f2c

Browse files
authored
Merge pull request LambdaTest#951 from surishubham/stage
removed extra hreflang attribute tag - IN-9472
2 parents 7292e79 + f1c3562 commit 3c56f2c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/pages/api-doc/index.jsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ import TabItem from '@theme/TabItem';
99

1010

1111
function ApiDoc() {
12+
useEffect(() => {
13+
const removeAlternateLinks = () => {
14+
const alternateLinks = document.querySelectorAll('link[rel="alternate"]');
15+
alternateLinks.forEach(link => link.parentNode.removeChild(link));
16+
};
17+
removeAlternateLinks();
18+
const observer = new MutationObserver((mutationsList) => {
19+
for (const mutation of mutationsList) {
20+
if (mutation.type === 'childList') {
21+
removeAlternateLinks();
22+
}
23+
}
24+
});
25+
observer.observe(document.body, { childList: true, subtree: true });
26+
return () => observer.disconnect();
27+
}, []);
1228
return (
1329
<Layout title="LambdaTest API Documentation"
1430
description="Manage and organize your test builds, test sessions, tunnel status and more with LambdaTest APIs for Selenium automation, App automation, Smart UI automation and Automated screenshots. ">

0 commit comments

Comments
 (0)