Untitled

mail@pastecode.io avatarunknown
plain_text
a month ago
5.2 kB
5
Indexable
Never
(function(){
    var style=document.createElement('style');style.type='text/css';style.appendChild(document.createTextNode('.block.block--background-absolute{    display: none;}.eg-main-container {    background-image: url(\'https://cfactory-img.s3.amazonaws.com/pitches/Oanda/EllipseNew.png\');    background-position: center bottom 5vw;    background-size: cover;    background-repeat: no-repeat;    background-color: #fafbfc;}.eg-badge .eg-badge-heading {    color: rgba(51, 51, 51, 0.50);    text-align: center;    font-family: Fellix, sans-serif;    font-size: 16px;    font-style: normal;    font-weight: 600;    line-height: 120%; /* 19.2px */    letter-spacing: 0.8px;}.eg-badge .eg-badge-img-container {    display: flex;    align-items: center;    justify-content: center;    gap: 140px;}.eg-review .eg-review-right-container img {    width: 100%;}.eg-review .eg-review-inr {    display: flex;    border-radius: 15px;    background: #00214A;    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.05);}.eg-review {    margin-bottom: 64px;    margin-top: 40px;}.eg-review .eg-review-left-container {    width: 388px;    padding-top: 56px;    padding-left: 56px;    display: flex;    flex-direction: column;    gap: 24px;}.eg-review .eg-review-right-container {    width: calc(100% - 395px);}.eg-review .eg-review-left-container img {    max-width: 50px;}.eg-review .eg-review-title {    color: #FFF;    font-family: Fellix, sans-serif;    font-size: 40px;    font-style: normal;    font-weight: 700;    line-height: 1.4;    text-align: left;}.eg-review .eg-review-title span {    color: #5E86F5;    font-family: Fellix, sans-serif;    font-size: 64px;    display: block;    margin-left: -2px;}'));document.head.appendChild(style);
(function (w) {
  "use strict";
  var tag = "cv-2-0", // TO DO: test name
    debug = document.cookie.indexOf("cfQA") > -1,
    window = typeof unsafeWindow !== "undefined" ? unsafeWindow : w;

  window[tag] = {
    log: function (msg) {
      if (debug) console.log("[CONV]", tag, "-->", msg);
    },
    waitForElement: function (cssSelector, callback) {
      var stop,
        elementCached,
        timeout,
        check = function () {
          try {
            elementCached = document.querySelector(cssSelector);

            if (stop) return;

            if (elementCached) {
              callback(elementCached);
              clearTimeout(timeout);

              window[tag].log(cssSelector + " found");
            } else {
              window.requestAnimationFrame(check);
            }
          } catch (err) {
            window[tag].log(err.message);
          }
        };

      window.requestAnimationFrame(check);

      timeout = setTimeout(function () {
        stop = true;
        window[tag].log(cssSelector + " not found");
      }, 15000);
    },
    start: function () {
      try {
        this.waitForElement("body", function (docBody) {
          docBody.classList.add(tag);
        });

        if (debug && document.title.indexOf("CONV QA") < 0) {
          document.title = "[CONV QA] " + document.title;
        }

        initVariation();

        window[tag].log("test running");
      } catch (err) {
        window[tag].log(err.message);
      }
    }
  };

  var cvReview = '' +
  '<div class="eg-main-container">'+
  '  <div class="eg-badge content_cards-row block background--full-width background--transparent">'+ 
  '      <div class="block__container">'+ 
  '      <div class="eg-badge-inr">'+ 
  '          <h2 class="eg-badge-heading">ACCREDITED BY</h2>'+ 
  '          <div class="eg-badge-img-container">'+ 
  '              <div class="eg-badge-img">'+ 
  '                  <img src="https://cfactory-img.s3.amazonaws.com/pitches/Oanda/cvTrust1.svg" alt="cvTrust1">'+ 
  '              </div>'+ 
  '              <div class="eg-badge-img">'+ 
  '                  <img src="https://cfactory-img.s3.amazonaws.com/pitches/Oanda/cvTrust2.svg" alt="cvTrust2">'+ 
  '              </div>'+ 
  '              <div class="eg-badge-img">'+ 
  '                  <img src="https://cfactory-img.s3.amazonaws.com/pitches/Oanda/cvTrust3.svg.svg" alt="cvTrust3">'+ 
  '              </div>'+ 
  '          </div>'+ 
  '      </div>'+ 
  '  </div>'+ 
  '  </div>'+ 
  '  <div class="eg-review content_cards-row block background--full-width background--transparent">'+ 
  '      <div class="block__container">'+ 
  '      <div class="eg-review-inr">'+ 
  '          <div class="eg-review-left-container">'+ 
  '              <img src="https://cfactory-img.s3.amazonaws.com/pitches/Oanda/cvLogo.png" alt="cvLogoAll">'+ 
  '              <h2 class="eg-review-title">Trusted by <span>1.2 M</span> worldwide traders</h2>'+ 
  '          </div>'+ 
  '          <div class="eg-review-right-container">'+ 
  '              <img src="https://cfactory-img.s3.amazonaws.com/pitches/Oanda/cvImgRating.png" alt="cvImgRating">'+ 
  '          </div>'+ 
  '      </div>'+ 
  '      </div>'+ 
  '      </div>'+ 
  '  </div>';

  window[tag].start();
  function initVariation() {
    window[tag].waitForElement('main .content_cards-row:nth-child(1)', function (ele) {
      ele.insertAdjacentHTML('afterend', cvReview);
    }, 50, 15000);
  }
})(window);



})();