Skip to content

Commit

Permalink
Upd: Remove custom js for replacing POS with POST as it is breaking s…
Browse files Browse the repository at this point in the history
…earch

Signed-off-by: George J Padayatti <[email protected]>
  • Loading branch information
georgepadayatti committed Nov 22, 2023
1 parent 676e836 commit aba6ec1
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions openapi/v2023.11.1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,42 +57,6 @@
applyStyleToApiInfo(); // Try applying the style immediately in case the element is already there
}
} else {
// Function to apply the style when the element is available
const applyStyleToApiInfo = () => {
const sidebar = rapiDocElement.shadowRoot.querySelector(
"[part*='section-navbar']"
);
const post = rapiDocElement.shadowRoot.querySelectorAll(
".nav-method.as-colored-block.post"
);
const method = rapiDocElement.shadowRoot.querySelectorAll(
".nav-method.as-colored-block"
);

if (sidebar && post) {
sidebar.style.minWidth = "385px";
post.forEach(function (element) {
element.innerHTML = "POST";
});
method.forEach(function (element) {
element.style.borderRadius = "4px 4px 4px 4px";
element.style.minWidth = "35px";
element.style.display = "flex";
element.style.justifyContent = "center";
element.style.alignItems = "center";
});

observer.disconnect(); // Stop observing once style is applied
}
};
const observer = new MutationObserver(applyStyleToApiInfo);
if (rapiDocElement.shadowRoot) {
observer.observe(rapiDocElement.shadowRoot, {
childList: true,
subtree: true,
});
applyStyleToApiInfo(); // Try applying the style immediately in case the element is already there
}
rapiDocElement.setAttribute("render-style", "read"); // for sizes greater than a tablet
}
});
Expand Down

0 comments on commit aba6ec1

Please sign in to comment.