1// ==================== START Stormhill ==================== 2// STORMHILL FIX - v3.6.4 3// Native smooth scroll for .mbt-book-purchase-button using capture phase 4// to bypass jQuery animate conflicts with themes like Divi. 5// DO NOT REVERT on plugin update. 6// ==================== END Stormhill ==================== 7document.addEventListener('DOMContentLoaded', function() { 8 var btn = document.querySelector('a.mbt-book-purchase-button'); 9 if (btn) { 10 btn.addEventListener('click', function(e) { 11 e.preventDefault(); 12 e.stopImmediatePropagation(); 13 var adminBar = document.getElementById('wpadminbar'); 14 var adminH = adminBar ? adminBar.offsetHeight : 0; 15 var target = document.querySelector('.mbt-book-purchase-section'); 16 if (target) { 17 var scrollTo = target.getBoundingClientRect().top + window.pageYOffset - adminH - 100; 18 window.scrollTo({ top: scrollTo, behavior: 'smooth' }); 19 } 20 }, true); // true = capture phase, fires before all bubble-phase handlers 21 } 22});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.