1'use strict'; 2 3function woof_init_text(){ 4 (function ($) { 5 let sparams = (new URL(window.location.href)).searchParams; 6 7 let data = { 8 // s: typeof sparams.get('woof_text') !== 'undefined' ? sparams.get('woof_text') : '' 9 }; 10 11 data = {...data, ...woof_husky_txt.default_data}; 12 delete data.page;//fix to avoid pagination breaking 13 14 [].forEach.call($.querySelectorAll('input.woof_husky_txt-input'), function (input) { 15 var txt = jQuery(input).val(); 16 data.s = txt; 17 new Husky(input, data); 18 }); 19 20 //init default wp search as Husky - to options - TODO 21 if (false) { 22 if ($.querySelectorAll('form[role=search] input[type=search]').length) { 23 24 [].forEach.call($.querySelectorAll('form[role=search] input[type=search]'), function (input) { 25 26 if (input.classList.contains('husky-input')) { 27 return;//already defined 28 } 29 30 if (input.closest('form[role=search]').querySelector('input[type=submit]')) { 31 input.closest('form[role=search]').querySelector('input[type=submit]').remove(); 32 } 33 34 var clone = input.cloneNode(true);//trick - reset theme actions 35 input.insertAdjacentElement('afterend', clone); 36 input.remove(); 37 38 new Husky(clone, data); 39 }); 40 41 } 42 } 43 })(document); 44}
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.