Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
2.3 kB
1
Indexable
Never
(function () {
  try {
    /* main variables */
    var debug = 0;
    var variation_name = "";
    var $;
    /* all Pure helper functions */

    function waitForElement(selector, trigger, delayInterval, delayTimeout) {
      var interval = setInterval(function () {
        if (
          document &&
          document.querySelector(selector) &&
          document.querySelectorAll(selector).length > 0
        ) {
          clearInterval(interval);
          trigger();
        }
      }, delayInterval);
      setTimeout(function () {
        clearInterval(interval);
      }, delayTimeout);
    }

    let egbadges = `
    <div class="eg-capterra-badges">
    <div class="eg-badge">
        <img src="https://www.vanderkraken.com/wp-content/uploads/2023/09/Image2.png" alt="">
    </div>
    <div class="eg-badge">
        <img src="https://www.vanderkraken.com/wp-content/uploads/2023/09/Image4.png" alt="">
    </div>
    <div class="eg-badge">
        <img src="https://www.vanderkraken.com/wp-content/uploads/2023/09/Image6.png" alt="">
    </div>
</div>`

    /* Variation Init */
    function init() {
      if (!document.querySelector(".eg-capterra-badges")) {
        document.querySelector("#capterra-div > h2").insertAdjacentHTML("afterend", egbadges);
      }
    }

    /* Initialize variation */
    waitForElement('#capterra-div > h2', init, 50, 15000);
  } catch (e) {
    if (debug) console.log(e, "error in Test" + variation_name);
  }
})();




.eg-capterra-badges {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.eg-badge>img {
    width: 100%;
    max-width: 100px;
}

.eg-capterra-badges>div:first-child img {
    width: 100%;
    max-width: 80px;
}

.eg-badge {
    margin-left: 20px;
}

#capterra-div>img {
    display: none !important;
}

@media only screen and (max-width:767px) {
    .eg-capterra-badges>div:first-child img {
        width: 100%;
        max-width: 80px;
    }

    .eg-badge>img {
        width: 100%;
        max-width: 90px;
    }
}

@media only screen and (min-width:767px) and (max-width:1024px) {
    .eg-badge>img {
        width: 100%;
        max-width: 120px;
    }

    .eg-capterra-badges>div:first-child img {
        width: 100%;
        max-width: 105px;
    }
}