vb

mail@pastecode.io avatarunknown
plain_text
12 days ago
9.8 kB
1
Indexable
Never
(function() {
  var debug = 0;
  var variation_name = "";
  if (window.location.href.indexOf('qa-debug=true') > -1) {
      debug = 1;
  }
  try {
      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);
      }
      var NewForm = '<div class="eg-new-hero-continer"><div class="eg-form-continer"></div></div>';
      // var NewForm1 = '<div class="eg-new-hero-continer"><div class="eg-form-continer"></div></div>';

      function EgForm() {
          if (!document.querySelector('.eg-new-hero-continer .s-hero__in')) {
              var HeroContent = document.querySelector('.s-hero__in');
              document.querySelector('.eg-new-hero-continer').insertAdjacentElement('afterbegin', HeroContent);
          }

          if (!document.querySelector(" .eg-form-continer .s-startup__form-wrap")) {
              var OldForm = document.querySelector(".s-startup__form-wrap");
              document.querySelector('.eg-form-continer').insertAdjacentElement('afterbegin', OldForm);
          }
      }

      function WhyLunchpad() {
          // if(!document.querySelector(".eg-new-hero-continer .s-hero__btn-wrap")){
          var WhyLunchpadCTA = document.querySelector(".s-hero__btn-wrap");
          document.querySelector(' .s-hero__in >.s-hero__text').insertAdjacentElement('afterend', WhyLunchpadCTA);
          // }
          var videoTXt='<p class="eg-video-txt"><span><svg xmlns="http://www.w3.org/2000/svg" width="10" height="11" viewBox="0 0 10 11" fill="none"><circle cx="5" cy="5.5" r="5" fill="#2B87C8"/></svg></span>Unlocking Success: Elevate Your Startup with Altium Launchpad</p>';
document.querySelector(".s-hero__video").insertAdjacentHTML('beforebegin', videoTXt);
      }

      function init() {
          if (debug) {
              console.log('Inside init Function');

          }
          if ((window.location.pathname == "/launchpad"||window.location.pathname == "/launchpad/") && !document.querySelector('.eg-new-hero-continer')) {
              document.querySelector('.s-hero__logo-block-wrap').insertAdjacentHTML('beforebegin', NewForm);
          }
          waitForElement(".eg-new-hero-continer ", EgForm, 50, 15000);
          waitForElement(".eg-new-hero-continer .s-hero__text", WhyLunchpad, 50, 15000);
          if (window.location.pathname == "/launchpad/thank-you" && !document.querySelector('.eg-new-hero-continer')) {

            document.querySelector('.s-hero__logo-block-wrap').insertAdjacentHTML('beforebegin', NewForm);
            window.scrollTo(0, 0);
        }

        waitForElement(" .s-startup__form-wrap", FormRelocation, 50, 25000);
      }

      function textchange(){
        document.querySelector("#am-mktoForm-step-1 .mktoButtonRow .mktoButton.wds-form-submit").innerText="Apply Now";
        if(document.querySelector("#am-mktoForm-step-2 .mktoButtonRow .mktoButton.wds-form-submit")){
          document.querySelector("#am-mktoForm-step-2 .mktoButtonRow .mktoButton.wds-form-submit").innerText="Apply Now";
        }
        
      }

      function FormRelocation() {
          // var EGForm = document.querySelector(".l-section.s-startup .s-success-stories ").offsetHeight;
          var EGForm =window.pageYOffset  + document.querySelector(".l-section.s-startup .s-success-stories ").getBoundingClientRect().top;
          window.addEventListener("scroll", function() {
              if (window.scrollY <= EGForm) {

                  if (!document.querySelector(" .eg-form-continer .s-startup__form-wrap")) {
                      var OldForm = document.querySelector(".s-startup__form-wrap");
                      document.querySelector('.eg-form-continer').insertAdjacentElement('afterbegin', OldForm);
                  }
              } else if (window.scrollY > EGForm) {

                  if (!document.querySelector(" .s-startup__form-row .s-startup__form-wrap")) {
                      var OldForm = document.querySelector(".s-startup__form-wrap");
                      document.querySelector('.s-startup__form-row ').insertAdjacentElement('afterbegin', OldForm);
                  }
              }

          })

      }


      waitForElement(".s-hero__logo-block-wrap,.s-hero__desc ", init, 50, 15000);
      waitForElement(".mktoButtonRow .mktoButton.wds-form-submit ", textchange, 50, 15000);

      
  } catch (e) {
      if (debug) console.log(e, "error in Test" + variation_name);
  }
})();



.s-hero._startup-program .s-hero__bg, .s-hero._startup-program .s-hero__bg{
    opacity: 0.1!important;
}
.eg-new-hero-continer {
    display: flex;
    flex-wrap: wrap;
}
.eg-new-hero-continer .s-hero__in {
    width: 50%;
    padding-right:50px 
}
.eg-new-hero-continer .eg-form-continer {
    width: 50%;
}
.eg-new-hero-continer a.wds-btn._medium._primary._m-width-lg._center {
    display: none;
}
.eg-new-hero-continer .s-hero__btn-wrap {
    margin-bottom: 59px;
}
.eg-new-hero-continer .s-hero__text-row {
    display: flex!important;
    flex-direction:column;
    gap:15px!important;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.20);
    background: #FFF;
    padding:10px;
    max-width:487px;
}
.eg-new-hero-continer .s-hero__video {
    max-width: 467px!important;
}
.eg-new-hero-continer.s-hero__text.wds-typography__text._size_m {
    color: #000;
    text-align: center;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 25px;
    text-align: left;
    margin-bottom: 30px;
}
.eg-new-hero-continer .eg-form-continer .s-startup__form-wrap {
    margin-bottom: 40px!important;
    padding: 30px!important;
}


.eg-new-hero-continer .s-hero__text-row .s-hero__text p{
    color: #000;
    text-align: center;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 25px;
}
.eg-new-hero-continer  .s-startup__form-wrap{
    min-height: 778px!important;
}
.b-video__wrap._use-on-click {
    position: relative!important;
}

p.eg-video-txt {
    position: absolute;
    z-index: 9;
    color: #FFF;
    /* font-family: Lato; */
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
    line-height: 35px; /* 178.571% */
    display: flex;
    /* flex-direction: column; */
    justify-content: center;
    flex: 1 0 0;
    align-self: stretch;
    left: 21px;
}

p.eg-video-txt svg {
    margin-right: 5px;
}
@media only screen and (min-width: 1197px)  {
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div:nth-child(2),
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div:nth-child(3),
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div:nth-child(6),
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div.mktoFormRow.form-type-select.form-item{
    width:48%!important;
    display: flex;
    }
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div:nth-child(2),
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div:nth-child(6){
    float:left;
    margin-right:18px!important;
    }
}

@media only screen and (max-width: 1198px) and (min-width: 1024px)  {
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div:nth-child(2),
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div:nth-child(3),
    .eg-new-hero-continer  #am-mktoForm-step-1 > form > div:nth-child(6),
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div.mktoFormRow.form-type-select.form-item{
    width:48%!important;
    display: flex;
    }
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div:nth-child(2),
    .eg-new-hero-continer #am-mktoForm-step-1 > form > div:nth-child(6){
    float:left;
    margin-right:15px!important;
    }
}
@media only screen and (max-width: 767px) {
    .eg-new-hero-continer {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
}
    .eg-new-hero-continer .s-hero__in {
        width: 100%;
        padding-right:0;
}
    .eg-new-hero-continer .eg-form-continer {
        width: 100%;
}
    .eg-new-hero-continer > div.s-hero__in {
        margin: 0 0 50px!important;
}
p.eg-video-txt {
    font-size:9px!important;
line-height: 12px!important;
padding-top:8px!important;

    
}
p.eg-video-txt svg {
    margin-right: 5px!important;
font-size:9px!important;
}
}

.b-video__wrap._use-on-click {
    position: relative!important;
}

p.eg-video-txt {
    position: absolute;
    z-index: 9;
    color: #FFF;
    /* font-family: Lato; */
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
    line-height: 35px; /* 178.571% */
    display: flex;
    /* flex-direction: column; */
    justify-content: center;
    flex: 1 0 0;
    align-self: stretch;
    left: 21px;
}

p.eg-video-txt svg {
    margin-right: 5px;
}
@media only screen and (max-width: 1200px) and (min-width:948px) {
p.eg-video-txt {
    font-size:9px;
line-height: 12px;
padding-top:8px;

    
}
p.eg-video-txt svg {
    margin-right: 5px;
font-size:9px;
}
}
@media only screen and (max-width: 947px) and (min-width:768px) {
    p.eg-video-txt {
    font-size:7px;}
p.eg-video-txt svg {
    margin-right: 5px;
font-size:9px;
}
}