1function waitUntilElementIsRendered(elementOrSelector, timeout) { 2 timeout = typeof timeout === "number" ? timeout : 10000; 3 const waitForElement = (resolve) => { 4 const startTime = window.performance.now(); 5 const checkElement = () => { 6 const currentTime = window.performance.now(); 7 if (currentTime - startTime >= timeout) { 8 resolve(null); 9 return; 10 } 11 const element = typeof elementOrSelector === "string" ? document.querySelector(elementOrSelector) : elementOrSelector; 12 if (jQuery("#pico-break").length) { 13 // Found the 'pico-break' element, wrap the button in a link that works ! 14 jQuery("#pico-break").parent().replaceWith('<div id="pico-break"><div class="ReadMore"><a href="https://hype.co/@theartsdeskcom/66kajkq6"><button class="pico-read-more">Subscribe now to read more</button></a></div></div>'); 15 return; 16 } 17 window.requestAnimationFrame(checkElement); 18 }; 19 window.requestAnimationFrame(checkElement); 20 }; 21 return new Promise(waitForElement); 22} 23 24Drupal.behaviors.all_pages_pico = { 25 attach: function (context, settings) { 26 waitUntilElementIsRendered(); 27 } 28}; 29 30jQuery(document).ready(function () { 31 jQuery('.field--name-field-footnote h2 a').click(function() { 32 jQuery('.field--name-field-footnote p').show(); 33 jQuery('.field--name-field-footnote').append('<a id="closeFootnote">Close footnote</a>'); 34 jQuery('#closeFootnote').click(function() { 35 jQuery('.field--name-field-footnote p').hide(); 36 jQuery('#closeFootnote').remove(); 37 }); 38 }) 39 jQuery('#edit-pass-pass1').on('change', function() { 40 jQuery('#edit-pass-pass2').val(jQuery('#edit-pass-pass1').val()); 41 }); 42 jQuery('#edit-mail').on('change', function() { 43 jQuery('#edit-name').val(jQuery('#edit-mail').val()); 44 }); 45}) 46
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.