diff --git a/src/ethicalads.js b/src/ethicalads.js index 26cd20b..86e3935 100644 --- a/src/ethicalads.js +++ b/src/ethicalads.js @@ -147,6 +147,28 @@ export class EthicalAdsAddon extends AddonBase { placement.classList.add("ethical-alabaster"); placement.classList.add("ethical-docsify"); + placement.setAttribute("data-ea-type", "readthedocs-sidebar"); + placement.setAttribute("data-ea-style", "image"); + knownPlacementFound = true; + } + } else if (docTool.isAntora()) { + selector = "aside nav.nav-menu"; + element = document.querySelector(selector); + + if (this.elementAboveTheFold(element)) { + placement.classList.add("ethical-alabaster"); + + placement.setAttribute("data-ea-type", "readthedocs-sidebar"); + placement.setAttribute("data-ea-style", "image"); + knownPlacementFound = true; + } + } else if (docTool.isMdBook()) { + selector = "nav#sidebar mdbook-sidebar-scrollbox"; + element = document.querySelector(selector); + + if (this.elementAboveTheFold(element)) { + placement.classList.add("ethical-alabaster"); + placement.setAttribute("data-ea-type", "readthedocs-sidebar"); placement.setAttribute("data-ea-style", "image"); knownPlacementFound = true;