Type: js
Runs After A Successful OptinMonster Conversion (om.Optin.success)
document.addEventListener(‘om.Optin.success’, function(event) { // This event is passed the Campaign object console.log(event.detail.Campaign); // This event is passed the Optin object console.log(event.detail.Optin); // This event is passed the success response console.log(event.detail.response); } );Continue reading
Weather API
Count Up
Passive Listener
addEventListener(document, “touchstart”, function(e) { console.log(e.defaultPrevented); // will be false e.preventDefault(); // does nothing since the listener is passive console.log(e.defaultPrevented); // still false }, Modernizr.passiveeventlisteners ? {passive: true} : false);Continue reading
Consult Conversion Page
gtag(‘event’, ‘conversion’, {‘send_to’: ‘AW-11073936294/9dSWCKudhIkYEKa3u6Ap’});Continue reading
Thank You Page
Alex Anzalone
Report from Pro-Football-Reference.com.Continue reading
Forum
// create new element const elem = document.createElement(‘div’) elem.className = ‘quetxt’ // add text elem.innerText = ‘Question:’ elem.style = ‘color:#d55900; font-weight:700; font-size: 18px; margin-top:15px; margin-bottom:10px; font-family:Georgia;’ // grab target element reference const target = document.querySelector(‘.article-header’) // insert the element before…Continue reading
Prevent Copy Paste
document.addEventListener(“contextmenu”, (evt) => { evt.preventDefault(); }, false); document.addEventListener(“copy”, (evt) => { evt.clipboardData.setData(“text/plain”, “You must pay a premium subscription to copy our content”); evt.preventDefault(); }, false);Continue reading