Skip to content

Commit

Permalink
Merge pull request #118 from fireblocks/SlavaSereb-patch-43
Browse files Browse the repository at this point in the history
Update scalar-api-interaction.js
  • Loading branch information
SlavaSereb authored Nov 26, 2024
2 parents c69479e + 1f7dcff commit 2f0f01c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scalar-api-interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@

// Function to hide the specified element
function hideElement() {
const elementToHide = document.querySelector('#app > div.api-references-layout > div.scalar-app.scalar-api-reference.references-layout.references-sidebar.references-sidebar-mobile-open > section > div.narrow-references-container > div:nth-child(2) > section > div > div > div:nth-child(2) > div > div > div:nth-child(1)');
console.log("Found element to hide:", !!elementToHide);
if (elementToHide) {
elementToHide.style.display = 'none';
console.log("Element hidden successfully");
let elementsToHide = [];
elementsToHide.push(document.querySelector('#app > div.api-references-layout > div.scalar-app.scalar-api-reference.references-layout.references-sidebar.references-sidebar-mobile-open > section > div.narrow-references-container > div:nth-child(2) > section > div > div > div:nth-child(2) > div > div > div:nth-child(1)'));
elementsToHide.push(document.querySelector('#app > div.api-references-layout > div.scalar-app.scalar-api-reference.references-layout.references-sidebar.references-sidebar-mobile-open > section > div.narrow-references-container > div:nth-child(2) > section > div > div > div:nth-child(2) > div > div > div:nth-child(2)'));

if (elementsToHide) {
elementsToHide.forEach( (elementToHide) => {
elementToHide.style.display = 'none';
console.log("Element hidden successfully");
})
}
}

Expand Down

0 comments on commit 2f0f01c

Please sign in to comment.