Skip to content

Instantly share code, notes, and snippets.

@boldsupport
Created February 21, 2020 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boldsupport/6a2e03d19c4fa7e17f1fcbffc4fb7024 to your computer and use it in GitHub Desktop.
Save boldsupport/6a2e03d19c4fa7e17f1fcbffc4fb7024 to your computer and use it in GitHub Desktop.
<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