1!function ($, window, document, _undefined) { 2 "use strict"; 3 4 $(document).ready(function () { 5 var data = $.parseJSON($('.js-XPressSearchSetup').first().html()), 6 searchForm = $('.js-quickSearch-constraint').closest('form'), 7 originalSearchUrl = searchForm.attr('action'), 8 keywordsInput = searchForm.find('input[name="keywords"]'), 9 menus = searchForm.find('.menu-row').slice(1); 10 11 $('.js-quickSearch-constraint').on('change', function ($event) { 12 var target = $($event.target), 13 value = target.val(); 14 15 try { 16 var parsedValue = $.parseJSON(value); 17 } 18 catch ($e) { 19 var parsedValue = {"search_type": null} 20 } 21 22 if (parsedValue.search_type === 'thxpress') { 23 searchForm.attr('action', data.url).attr('method', 'GET'); 24 keywordsInput.attr('name', 's'); 25 if(menus.is(':visible')) { 26 menus.finish().slideUp(200); 27 } 28 } 29 else { 30 searchForm.attr('action', originalSearchUrl).attr('method', 'POST'); 31 keywordsInput.attr('name', 'keywords'); 32 if(menus.is(':hidden')) { 33 menus.finish().slideDown(200); 34 } 35 } 36 }); 37 }); 38}(jQuery, window, document);
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.