Untitled
unknown
plain_text
3 years ago
1.7 kB
9
Indexable
(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);
}
/* Variation functions */
function init(){
document.querySelector("div.s-trial__cols > div:nth-child(1) > div.b-steps-free-trial").insertAdjacentHTML("afterend", "<p id='eg_faq'>Looking for Something ? Check out our FAQs</p>")
document.querySelector("#eg_faq").addEventListener("click",()=>{
document.querySelector("div.l-page__in > div > article > section").scrollIntoView({behavior: "smooth"}) })
}
/* Initialize variation */
waitForElement(".s-trial .b-steps-free-trial", init, 100, 35000);
} catch (e) {
if (debug) console.log(e, "error in Test" + variation_name);
}
})();
.s-trial__col p#eg_faq {
text-align: center;
padding-top: 15px;
margin-bottom: -10px;
color: #2B87C8;
cursor: pointer;
font-weight: 400;
}
Editor is loading...