function preventNumberScroll(e) { if (e.target.matches(‘input[type=”number”]’) || e.target.closest(‘input[type=”number”]’)) { e.preventDefault(); } } document.addEventListener(‘wheel’, preventNumberScroll, { passive: false, capture: true }); document.addEventListener(‘mousewheel’, preventNumberScroll, { passive: false, capture: true }); document.addEventListener(‘DOMMouseScroll’, preventNumberScroll, { passive: false, capture: true });Continue reading
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(document.referrer.search.indexOf(‘google.com’) > 0) { // replace with the specific referral domain var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID-holder’); // replace CAMPAIGN_ID with the unique ID for your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(document.referrer.search.indexOf(‘google.com’) > 0) { // replace with the specific referral domain var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID’); // replace CAMPAIGN_ID with the unique ID for your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(window.location.search.indexOf(‘shopping-cart’) > -1) { // replace shopping-cart wtih your specific URL path var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID-holder’); // replace CAMPAIGN_ID with the unique ID of your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(window.location.href == ‘https://example.com/specific-page’) { // replace with your specific URL var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID-holder’); // replace CAMPAIGN_ID with your campaign’s unique ID optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(window.location.href == ‘https://example.com/specific-page’) { // replace with your specific URL var optinCampaign = document.querySelector(‘#om-‘ + event.detail.Campaign.id + ‘-holder’); optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading
document.addEventListener(‘om.Main.init’, function (evt) { var Strings = evt.detail._utils.strings; // Replace ¡Copiada! below with the text you wish to use. Strings[‘Copied!’] = ‘¡Copiada!’; });Continue reading
document.addEventListener(‘om.Campaign.init.preload’, function(event) { var campaign = event.detail.Campaign; // replace {id} with the unique ID of your OptinMonster campaign if ({id} === campaign.id) { campaign.settings.preload = false; } });Continue reading
document.addEventListener(‘om.Campaign.init.preload’, function(event) { event.detail.Campaign.settings.preload = false; });Continue reading
om{{id}}.startClose();Continue reading