Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
3.9 kB
5
Indexable

<style>
  .optimize-banner-p13n {
    background-color: #4C70B8;
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    padding: 16px 0;
    position: relative;
    text-align: center;
    z-index: 5000000;
  }
  .optimize-banner-p13n > h1 {
    color: #E5E5E5;
    font-weight: bold;
    font-size: 22px;
    margin: 0 0 0 56px;
    position: absolute;
  }
  .optimize-banner-p13n > p {
    color: #E8F0FE;
    margin: 0 16px;
  }
  .optimize-banner-p13n > p > a {
    color: inherit;
    padding: 0 4px;
  }
  .optimize-banner-p13n > p > button {
    background-color: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    float: right;
    font-size: 24px;
    height: 32px;
    width: 32px;
    position: absolute;
    top: 0;
    right: 0;
  }
  div#__next div > a img {
    top: 65px !important;
}
  @media (max-width: 1280px) {
    .optimize-banner-p13n > h1 {
      position: static;
      font-size: 18px;
      line-height: 28px;
      margin: 0 16px;
    }
  }
  @media(max-width:568px) {
.optimize-banner-p13n > p > button {
    top: -11px !important;
    right: -32px !important;
}
    div#__next div > a img {
    top: 90px !important;
}
}

@media(min-width:569px) and (max-width: 793px) {
.optimize-banner-p13n > p > button {
    top: 0 !important;
    right: -32px !important;
}
}
header.optimize-banner-p13n>p>a {
  text-decoration-line : underline;
  text-decoration-thickness : initial;
  text-decoration-style : initial;
  text-decoration-color : initial;
}

</style>
<header class="optimize-banner-p13n">
  <h1>
    
  </h1>
  <p>
    It’s Teacher Appreciation Week! Free Wills for educators until 5/12/23.
    <a href="#" aria-label="Read more here. about banner personalizations"><i>Redeem here</i></a>
    <button aria-label="Close" onclick="this.parentElement.parentElement.style.display='none'">×</button>
  </p>
</header>


(function () {
  try {
    /* main variables */
    var debug = 0;
    var variation_name = "";

    /* 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);
    }
    function setCookie(name, value, days) {
      var expires = "";
      if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        expires = "; expires=" + date.toUTCString();
      }
      document.cookie = name + "=" + (value || "") + expires + "; path=/";
    }
    function getCookie(name) {
      var nameEQ = name + "=";
      var ca = document.cookie.split(';');
      for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
      }
      return null;
    }
    /* Variation functions */
    /* Variation Init */
    function init() {
      document.querySelector('header.optimize-banner-p13n button').addEventListener('mousedown', function () {
        setCookie('bannerClose', true, 365);
document.body.classList.remove('eg-top');
      });
        document.body.classList.add('eg-top');
      if (getCookie('bannerClose')) {
        document.querySelector('header.optimize-banner-p13n') && document.querySelector('header.optimize-banner-p13n').remove();
       document.body.classList.remove('eg-top');
      }
    }

    /* Initialise variation */
    waitForElement("header.optimize-banner-p13n button", init, 50, 15000);
  } catch (e) {
    if (debug) console.log(e, "error in Test" + variation_name);
  }
})();