PageSourceSearch

https://www.middys.com.au/js/scripts/minified/branch-search.min.js?v=12.14

js middys.com.au collected 2026-09-29 08:53:48 UTC 3,817 bytes, 2 lines download raw bytes

1function showbranchSelection(){$("a#user-SelectedBranchName").hasClass("active")?($("a#user-SelectedBranchName").removeClass("active"),$(".header-bottom .selection-box").slideUp(350)):($("a#user-SelectedBranchName").addClass("active"),$(".header-bottom .selection-box").slideDown(350))}function Show_PopupOnPage(){var e=window.location.pathname;return"/"===e||/^\/c\//.test(e)||/^\/p\//.test(e)}function Update_ComponentOnPage(e,t){var n,a;"/"===window.location.pathname&&Refresh_PopularProducts(e),/^\/c\//.test(window.location.pathname)&&window.reloadMiddysProductListing(),(/^\/smartsearch(\/|$)/.test(window.location.pathname)||/^\/featured-products\//.test(window.location.pathname))&&window.reloadMiddysProductListing(),/^\/myaccount\/purchase-history(\/|$)/.test(window.location.pathname)&&window.reloadPurchaseHistoryProducts(),/^\/p\//.test(window.location.pathname)&&(window.reloadProductDetailComponent(),n=$("#selected-branch-stock"),a=$("#"+t+"_stock_status"),n.empty(),n.removeClass().addClass(a.attr("class")).text(a.text()),$("#selected-branch-name").text($("#"+t+"_name").text()),$("#selected-branch-address").text($("#"+t+"_address").text())),"/cart"===window.location.pathname&&window.reloadCartComponent(),$("#RecentlyViewedWidget").length&&Refresh_RecentlyViewed(e)}function loadAddressFinder(e){var t=e+"-suggestions-list";$("#"+t).remove(),$("#"+e).off(),new AddressFinder({targetInputId:e,showAddresses:!1,showLocations:!0,suggestionsListId:t,onSelect:function(e,t){$("input[id='searchBranchLatitude']").val(t.latitude),$("input[id='searchBranchLongitude']").val(t.longitude),$("input#branch-search-submit").click(),$("a#user-SelectedBranchName").click(),$(".custom-select, .field-wrap select").select2({minimumResultsForSearch:1/0,width:"style"}),showbranchSelection()}})}function googleAnalyticsEventForBranchSearch(e){var t=window.location.pathname,n=$("#branch-selection-container"),a=n.find("input.branch-search:first").val()||"",n=n.find(".nearby-branches").find(".branch-data").length||0,e=!!sessionStorage.getItem("userSessionLatitude")||e.isGeoSearch;addGoogleAnalyticsEvent({event:"branch_search",search_term:a,result_count:n,use_geolocation:e,selected_branch_id:"",selected_branch_name:"",source:t})}function googleAnalyticsEventForBranchSelect(e,t){var n=window.location.pathname,a=$("#branch-selection-container"),o=a.find("input.branch-search:first").val()||"",a=a.find(".nearby-branches").find(".branch-data").length||0,c=!!sessionStorage.getItem("userSessionLatitude");addGoogleAnalyticsEvent({event:"branch_select",search_term:o,result_count:a,use_geolocation:c,selected_branch_id:e,selected_branch_name:t,source:n})}!function(c){"use strict";c.fn.branchSearchPost=function(e){var t=c.extend({targetContainerSelector:"#target-list",url:"",isGeoSearch:!1},e),n=function(e){c(t.targetContainerSelector).html(e);e=c("input.branch-search:first");t.isGeoSearch&&c("input.branch-search:first").val(""),e.focus(),googleAnalyticsEventForBranchSearch(t)},a=function(e){console.log(e)},o=function(e){e=c(e).closest("form");return{url:e.attr("action"),method:e.attr("method"),data:e.serialize()}};return this.unbind("click"),this.click(function(e){e.preventDefault();e=o(this);c.ajax({method:e.method,url:e.url,data:e.data,success:n,failure:a})}),this.click()}}(jQuery),function(c){"use strict";c.fn.clickSelection=async function(e){var t=c('input[name="__RequestVerificationToken"]').val(),n=c(this),a=n.data("id"),o=n.parent().find(".branch-data label").text(),n=n.data("login");googleAnalyticsEventForBranchSelect(a,o),await Set_SelectedBranch(a,n,t,Show_PopupOnPage()),Update_ComponentOnPage(t,a),setTimeout(()=>{loadAddressFinder("searchAULocation")},500)}}(jQuery),$(document).ready(function(){loadAddressFinder("searchAULocation")});
2//# sourceMappingURL=branch-search.min.js.map

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.