Created
February 21, 2020 18:02
-
-
Save boldsupport/6a2e03d19c4fa7e17f1fcbffc4fb7024 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var cloneSticky = function(num){ | |
if(document.querySelector('#satcb_checkout_btn')) | |
{ | |
document.querySelector('#satcb_checkout_btn').outerHTML = document.querySelector('#satcb_checkout_btn').outerHTML; | |
document.querySelector('#satcb_checkout_btn').addEventListener("click",function(){ | |
if(document.querySelector('.bold_clone')){ | |
document.querySelector('.bold_clone').click(); | |
} | |
else{ | |
document.querySelector('#checkout-button').click();//need to change selector based on theme | |
} | |
}) | |
} | |
else | |
{ | |
if(num < 10) | |
{ | |
num++; | |
setTimeout(function(){ | |
cloneSticky( num ); | |
}, 200); | |
} | |
} | |
} | |
cloneSticky(0); | |
function boldEventEmitterLoaded(){ | |
BOLD.common.eventEmitter.on('BOLD_UPSELL_modal_opened', function(data){ | |
document.querySelector(".satcb_checkout_top").hidden = true; | |
}) | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment