vc

mail@pastecode.io avatar
unknown
plain_text
a year ago
14 kB
1
Indexable
(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 NewTitle = '<h2 class="eg-video-title">Get Access to Tools, Resources & Support for Rapid Startup Growth</h2>';

      var ListItem = '' +
          '  <div class="eg-hero-list-item">' +
          '      <ul>' +
          '          <li>Get reduced pricing to Altium Designer and free access to Altium 365 </li>' +
          '          <li>Learn how to master Altium\’s PCB design tool with optimized training options and 24/7 access to dedicated support.</li>' +
          '          <li> Join 200+ Startups that Have Taken Advantage of Altium Launchpad!</li>' +
          '      </ul>' +
          '  </div>' +
          '  <div class="eg-logo-section">' +
          '     <div class="eg-first-row"> <div class="s-hero__logo-item"><img src="//cdn-static.altium.com/sites/default/files/media_icon/2023-08/apollo.svg" alt="apollo" loading="lazy"></div>' +
          '      <div class="s-hero__logo-item"><img src="//cdn-static.altium.com/sites/default/files/media_icon/2023-08/knight.svg" alt="knight" loading="lazy"></div>' +
          '      <div class="s-hero__logo-item"><img src="//cdn-static.altium.com/sites/default/files/media_icon/2023-08/MistyWest.svg" alt="MistyWest" loading="lazy"></div>' +
          '      <div class="s-hero__logo-item"><img src="//cdn-static.altium.com/sites/default/files/media_icon/2023-08/project.svg" alt="project" loading="lazy"> </div></div>' +
          '     <div class="eg-second-row"> <div class="s-hero__logo-item"><img src="//cdn-static.altium.com/sites/default/files/media_icon/2023-08/shaper.svg" alt="shaper" loading="lazy"></div>' +
          '      <div class="s-hero__logo-item"><img src="//cdn-static.altium.com/sites/default/files/media_icon/2023-08/tzoa.svg" alt="tzoa" loading="lazy"></div></div>' +
          '  </div>';

      function initForm() {
          if (!document.querySelector(' .eg-hero-list-item')) {
              document.querySelector(' .s-hero__btn-wrap').insertAdjacentHTML('afterend', ListItem);
          }

          var VideoSection = document.querySelector(".s-hero__text-row")
          document.querySelector('.s-hero__desc').insertAdjacentElement('beforebegin', VideoSection);

          if (!document.querySelector(".s-hero__text-row .s-hero__text .eg-video-title"))
              document.querySelector(".s-hero__text-row .s-hero__text").insertAdjacentHTML('afterbegin', NewTitle);

      }

      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 initdesktop() {
          if (debug) {
              console.log('Inside init Function');

          }
          if (!document.querySelector('.eg-new-hero-continer')) {
              document.querySelector('.s-hero__desc').insertAdjacentHTML('beforebegin', NewForm);
          }

          waitForElement(".eg-new-hero-continer ", EgForm, 50, 15000);
          waitForElement(".eg-new-hero-continer .s-hero__text", WhyLunchpad, 50, 15000);
          waitForElement(".s-hero__desc", initForm, 50, 15000);

          if (window.location.pathname == "/launchpad/thank-you") {
              window.scrollTo(0, 0);
          }
          waitForElement(".s-startup__form-row .s-startup__form-wrap", FormRelocation, 50, 25000);

      }

      function FormRelocation() {
          // var EGForm = document.querySelector(".help-your-startup").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-wrap")) {
                      var OldForm = document.querySelector(".s-startup__form-wrap");
                      document.querySelector('.s-startup__form-row ').insertAdjacentElement('afterbegin', OldForm);
                  }
              }

          })

      }
      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";
        }
        
      }

      waitForElement(".s-hero__desc", initdesktop, 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, .s-hero__logo-block-wrap {
    display: none;
}
.eg-new-hero-continer .s-hero__btn-wrap {
    margin-bottom: 59px;
}
.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;
}
.s-hero__video {
    max-width: 502px!important;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.20);
    background: #FFF;
    padding: 10px;
}
.s-hero__text.wds-typography__text._size_m {
    color: #000;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 25px;
}
.eg-logo-section {
    display: flex;
    width: 405px;
    height: 132px;
    padding: 20px 10px;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
    border-radius: 10px;
    background: linear-gradient(89deg, rgba(255, 255, 255, 0.40) 33.88%, rgba(255, 255, 255, 0.10) 89.27%);
    box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(20px);
    flex-direction: row;
}
.eg-hero-list-item ul li {
    color: #000;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 25px;
}
.s-hero__logo-item {
    width: 25%;
}
.eg-second-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
}
.eg-first-row {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 12px;
    align-items: center;
}
.eg-first-row s-hero__logo-item img:nth-child(1){
    width: 119px;
    height: 31px;
    flex-shrink: 0;
}
.eg-first-row s-hero__logo-item img:nth-child(2){
    width: 113px;
    height: 23px;
    flex-shrink: 0;
}
.eg-first-row s-hero__logo-item img:nth-child(3){
    width: 71px;
    height: 31px;
    flex-shrink: 0;
}
.eg-first-row s-hero__logo-item img:nth-child(4){
    width: 123px;
    height: 31px;
    flex-shrink: 0;
}
.eg-second-row s-hero__logo-item img:nth-child(1){
    width: 104px;
    height: 25px;
    flex-shrink: 0;
}
.eg-second-row s-hero__logo-item img:nth-child(2){
    width: 92px;
    height: 21px;
    flex-shrink: 0;
}
h2.eg-video-title {
    color: #000;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}
@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;
   }
    .eg-logo-section{
        width: 100%!important;
        height: 100%!important;
   }
    .eg-first-row {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        gap: 12px;
        align-items: center;
        flex-wrap: wrap;
   }
    .eg-second-row {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        gap: 12px;
        align-items: center;
        text-align: left;
        width: 100%;
   }
}
.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: 707px!important;
}
@media only screen and (min-width: 1197px)  {
    #am-mktoForm-step-1 > form > div:nth-child(2),
    #am-mktoForm-step-1 > form > div:nth-child(3),
    #am-mktoForm-step-1 > form > div:nth-child(6),
    #am-mktoForm-step-1 > form > div.mktoFormRow.form-type-select.form-item{
     width:48%!important;
     display: flex;
    }
    #am-mktoForm-step-1 > form > div:nth-child(2),
    #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)  {
    #am-mktoForm-step-1 > form > div:nth-child(2),
    #am-mktoForm-step-1 > form > div:nth-child(3),
    #am-mktoForm-step-1 > form > div:nth-child(6),
    #am-mktoForm-step-1 > form > div.mktoFormRow.form-type-select.form-item{
     width:48%!important;
     display: flex;
    }
 #am-mktoForm-step-1 > form > div:nth-child(2),
    #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: 16px!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;
    padding-top: 10px;
}

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: 18px;
}
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;
}
}
    @media only screen and (max-width: 1200px) {
    .eg-logo-section{
width: auto!important;
    }
    }