PageSourceSearch

https://www.onlyuniform.co.uk/cdn/shop/t/2/assets/theme.js?v=158644568713149845651776772285

js onlyuniform.co.uk collected 2026-10-10 02:17:29 UTC 11,527 bytes, 41 lines download raw bytes

1const textValue = $(".disclosure__link--active .localization-form__currency").text().replace(/\(|\)/g, '').split(" ")
2const moneySyembol = localStorage.getItem("money") || textValue[2] || textValue[1] || "$"
3
4"object"==typeof Countries&&(Countries.updateProvinceLabel=function(e,t){if("string"==typeof e&&Countries[e]&&Countries[e].provinces&&("object"==typeof t||null!==(t=document.getElementById("address_province_label")))){t.innerHTML=Countries[e].label;var a=jQuery(t).parent();a.find("select"),a.find(".custom-style-select-box-inner").html(Countries[e].provinces[0])}}),void 0===Shopify.Cart&&(Shopify.Cart={}),Shopify.Cart.ShippingCalculator=function(){var _config={submitButton:"Calculate shipping",submitButtonDisabled:"Calculating...",templateId:"shipping-calculator-response-template",wrapperId:"wrapper-response",customerIsLoggedIn:!1,moneyFormat: moneySyembol+"{{amount}}"},_render=function(e){var t=jQuery("#"+_config.templateId),a=jQuery("#"+_config.wrapperId);if(t.length&&a.length){var r=Handlebars.compile(jQuery.trim(t.text()))(e);if(jQuery(r).appendTo(a),"undefined"!=typeof Currency&&"function"==typeof Currency.convertAll){var n="";jQuery("[name=currencies]").size()?n=jQuery("[name=currencies]").val():jQuery("#currencies span.selected").size()&&(n=jQuery("#currencies span.selected").attr("data-currency")),""!==n&&Currency.convertAll(shopCurrency,n,"#wrapper-response span.money, #estimated-shipping span.money")}}},_enableButtons=function(){jQuery(".get-rates").removeAttr("disabled").removeClass("disabled").val(_config.submitButton)},_disableButtons=function(){jQuery(".get-rates").val(_config.submitButtonDisabled).attr("disabled","disabled").addClass("disabled")},_getCartShippingRatesForDestination=function(e){var t={type:"POST",url:"/cart/prepare_shipping_rates",data:jQuery.param({shipping_address:e}),success:_pollForCartShippingRatesForDestination(e),error:_onError};jQuery.ajax(t)},_pollForCartShippingRatesForDestination=function(e){var t=function(){jQuery.ajax("/cart/async_shipping_rates",{dataType:"json",success:function(a,r,n){200===n.status?_onCartShippingRatesUpdate(a.shipping_rates,e):setTimeout(t,500)},error:_onError})};return t},_fullMessagesFromErrors=function(e){var t=[];return jQuery.each(e,function(e,a){jQuery.each(a,function(a,r){t.push(e+" "+r)})}),t},_onError=function(XMLHttpRequest,textStatus){jQuery("#estimated-shipping").hide(),jQuery("#estimated-shipping em").empty(),_enableButtons();var feedback="",data=eval("("+XMLHttpRequest.responseText+")");"Error : country is not supported."==(feedback=data.message?data.message+"("+data.status+"): "+data.description:"Error : "+_fullMessagesFromErrors(data).join("; ")+".")&&(feedback="We do not ship to this destination."),_render({rates:[],errorFeedback:feedback,success:!1}),jQuery("#"+_config.wrapperId).show()},_onCartShippingRatesUpdate=function(e,t){_enableButtons();var a="";if(t.zip&&(a+=t.zip+", "),t.province&&(a+=t.province+", "),a+=t.country,e.length){"0.00"==e[0].price?jQuery("#estimated-shipping em").html("FREE"):jQuery("#estimated-shipping em").html(_formatRate(e[0].price));for(var r=0;r<e.length;r++)e[r].price=_formatRate(e[r].price)}_render({rates:e,address:a,success:!0}),jQuery("#"+_config.wrapperId+", #estimated-shipping").fadeIn()},_formatRate=function(e){function t(e,t){return void 0===e?t:e}function a(e,a,r,n){if(a=t(a,2),r=t(r,","),n=t(n,"."),isNaN(e)||null==e)return 0;var i,s=(e=(e/100).toFixed(a)).split(".");return s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r)+(s[1]?n+s[1]:"")}if("function"==typeof Shopify.formatMoney)return Shopify.formatMoney(e,_config.moneyFormat);"string"==typeof e&&(e=e.replace(".",""));var r="",n=/\{\{\s*(\w+)\s*\}\}/,i=_config.moneyFormat;switch(i.match(n)[1]){case"amount":r=a(e,2);break;case"amount_no_decimals":r=a(e,0);break;case"amount_with_comma_separator":r=a(e,2,".",",");break;case"amount_no_decimals_with_comma_separator":r=a(e,0,".",",")}return i.replace(n,r)};return _init=function(){new Shopify.CountryProvinceSelector("address_country","address_province",{hideElement:"address_province_container"});var e=jQuery("#address_country"),t=jQuery("#address_province_label").get(0);"undefined"!=typeof Countries&&(Countries.updateProvinceLabel(e.val(),t),e.change(function(){Countries.updateProvinceLabel(e.val(),t)})),jQuery(".get-rates").click(function(){_disableButtons(),jQuery("#"+_config.wrapperId).empty().hide();var e={};e.zip=jQuery("#address_zip").val()||"",e.country=jQuery("#address_country").val()||"",e.province=jQuery("#address_province").val()||"",_getCartShippingRatesForDestination(e)}),_config.customerIsLoggedIn&&jQuery(".get-rates:eq(0)").trigger("click")},{show:function(e){e=e||{},jQuery.extend(_config,e),jQuery(function(){_init()})},getConfig:function(){return _config},formatRate:function(e){return _formatRate(e)}}}(),theme.Currency=function(){var e = moneySyembol + "{{amount}}";function t(t,a){"string"==typeof t&&(t=t.replace(".",""));var r="",n=/\{\{\s*(\w+)\s*\}\}/,i=a||e;function s(e,t,a,r){if(a=a||",",r=r||".",isNaN(e)||null===e)return 0;var n,i=(e=(e/100).toFixed(t)).split(".");return i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+a)+(i[1]?r+i[1]:"")}switch(i.match(n)[1]){case"amount":r=s(t,2);break;case"amount_no_decimals":r=s(t,0);break;case"amount_with_comma_separator":r=s(t,2,".",",");break;case"amount_no_decimals_with_comma_separator":r=s(t,0,".",",");break;case"amount_no_decimals_with_space_separator":r=s(t,0," ");break;case"amount_with_apostrophe_separator":r=s(t,2,"'")}return i.replace(n,r)}return{formatMoney:t}}(),theme.wishlist=function(){var e=".wishlist-add-btn",t=".wishlist-remove-btn",a=$(".wishlist-count-wrapper"),r=$(".main-wishlist-popup-content"),n=JSON.parse(localStorage.getItem("localWishlist"))||[],i=$(".js-wishlist-link").attr("href"),s=function(){r.html('<div class="wishlist-empty-heading"><h2 class="theme_main_heading">Your wishlist is empty</h2><div class="alert alert-warning">'+theme.strings.wishlistNoResult+'</div><a href="/collections/all" class="theme_buttons">
4Return to shop</a></div>')};function o(t){var r=$(t).data("handle"),s=$(e+'[data-handle="'+r+'"]');-1!==$.inArray(r,n)?window.location.href=i:(n.push(r),s.fadeOut("slow").fadeIn("fast").html(theme.strings.wishlistIconAdded+theme.strings.wishlistTextAdded),s.attr("data-original-title",theme.strings.wishlistTextAdded),$(".tooltip-inner").text(theme.strings.wishlistTextAdded)),localStorage.setItem("localWishlist",JSON.stringify(n)),a.text(n.length)}function c(){if(r.html(""),n.length>0)for(var t=0;t<n.length;t++){var i=n[t];Shopify.getProduct(i,function(e){var t="",a=e.price_varies?"from "+theme.Currency.formatMoney(e.price_min,theme.moneyFormat):theme.Currency.formatMoney(e.price,theme.moneyFormat),n=0!==e.compare_at_price_min?theme.Currency.formatMoney(e.compare_at_price_min,theme.moneyFormat):"";t+='<div class="wishlist-item-wrapper price--on-sale">',t+='<div class="wishlist-item-wrapperbox">',t+='<div class="wishlist-main-wrapper">',t+='	<a class="wishlist-img-wrapper" href="'+e.url+'">',t+='		<img src="'+e.featured_image+'"/>',t+="	</a>",t+='	<div class="wishlist-name-wrapper"><a href="'+e.url+'" class="title-prouct" >'+e.title+"</a>",t+='	 <s class="price-item price-item--regular">'+n+"</s>",t+="	<span> "+a+"</span></div>",t+='<button class="btn wishlist-remove-btn" data-handle="'+e.handle+'">'+theme.strings.wishlistRemove+'</button>',t+="</div>",t+="</div>",t+="</div>",r.append(t)})}else s();
4a.text(n.length),$(e).each(function(){var e=$(this).data("handle"),t=-1!==$.inArray(e,n)?theme.strings.wishlistIconAdded:theme.strings.wishlistIcon,a=-1!==$.inArray(e,n)?theme.strings.wishlistTextAdded:theme.strings.wishlistText;$(this).html(t+a).attr("title",a)})}return $(document).on("click",e,function(e){e.preventDefault(),o(this)}),$(document).on("click",t,function(){var t=$(this).data("handle"),r=$(e+'[data-handle="'+t+'"]');r.html(theme.strings.wishlistIcon+theme.strings.wishlistText),r.attr("data-original-title",theme.strings.wishlistText),$(".tooltip-inner").text(theme.strings.wishlistText),n.splice(n.indexOf(t),1),localStorage.setItem("localWishlist",JSON.stringify(n)),$(this).closest(".wishlist-item-wrapper").fadeOut(),a.text(n.length),0===n.length&&s()}),c(),$(document).on("shopify:section:load",c),{load:c}}(),theme.compare=function(){var e=".compare-popup-btn",t=".compare-popup-remove-btn",a=$(".lg-compare-count"),r=$(".main-compare-popup-content"),n=JSON.parse(localStorage.getItem("localCompare"))||[],i="notice";function s(e){var t=$(e).data("handle"),r="";-1!==$.inArray(t,n)?(n.splice(n.indexOf(t),1),r=theme.strings.compareNotifyRemoved,i="notice"):4===n.length?(r=theme.strings.compareNotifyMaximum,i="error"):(i="notice",n.push(t),r=theme.strings.compareNotifyAdded),localStorage.setItem("localCompare",JSON.stringify(n)),theme.alert.new(theme.strings.compareText,r,2e3,i),a.text(n.length)}function o(){var t;if(r.html(""),n.length>0){t=1===n.length?"col-md-6 col-sm-6":"col";for(var i=0;i<n.length;i++){var s=n[i];Shopify.getProduct(s,function(e){var a="",n=e.price_varies?"from "+theme.Currency.formatMoney(e.price_min,theme.moneyFormat):theme.Currency.formatMoney(e.price,theme.moneyFormat),i=0!==e.compare_at_price_min?theme.Currency.formatMoney(e.compare_at_price_min,theme.moneyFormat):"",s=""!==e.type?'<a href="/collections/types?q='+e.type+'">'+e.type+"</a>":"<span>"+theme.strings.none+"</span>",o=""!==e.vendor?'<a href="/collections/vendors?q='+e.vendor+'">'+e.vendor+"</a>":"<span>"+theme.strings.none+"</span>";a+='<div class="compare-item '+t+' col-xs-6">',a+='	<a href="'+e.url+'" class="product_img">',a+='		<img src="'+Shopify.resizeImage(e.featured_image,"x300")+'"/>',a+="	</a>",a+='	<a href="'+e.url+'" class="product_title">'+e.title+"</a>",a+='	<del class="price-item price-item--regular"> '+n+"</del>",a+="	<span>"+i+"</span>",a+="	"+s,a+="	"+o,a+='  <button class="btn compare-popup-remove-btn" data-handle="'+e.handle+'">'+theme.strings.compareRemove+'</button>',a+="</div>",r.append(a)})}}else r.html('<div class="alert alert-warning d-inline-block">'+theme.strings.compareNoResult+"</div>");
4$(e).each(function(){var e=$(this).data("handle"),t=-1!==$.inArray(e,n)?"added":"";$(this).removeClass("added").addClass(t)}),a.text(n.length)}return $(document).on("click",e,function(e){e.preventDefault(),s(this),o()}),$(document).on("click",t,function(){var e=$(this).data("handle");n.splice(n.indexOf(e),1),localStorage.setItem("localCompare",JSON.stringify(n)),o()}),o(),$(document).on("shopify:section:load",o),{load:o}}(),theme.alert=function(){function e(e,t,a,r){var n=e||"",i=a||2e3,s=t||"",o=r||"default";$.growl({title:n,message:s,duration:i,style:o,size:"large"})}return{new:e}}(),$(document).ready(function(){$(".preloader").addClass("hidden")});
5function searchwidget(){
6	if ($(document).width() <= 991)
7	{
8		$('#drawer_currency_div').appendTo('#drawer_currency_responsive_cover');
9	}
10	else
11	{
12		$('#drawer_currency_div').insertAfter('.announcement_bar_slider_text');
13	}
14}
15
16$(document).ready(function(){
17	searchwidget();	
18});
19
20$( window ).resize(function() {
21	searchwidget();
22});
23
24  function searchbar(){
25	if ($(document).width() <= 991)
26	{
27		$('.top-search-bottom-menu .search-modal__form1').appendTo('.top-search-bottom-menu #search-bar-bottom');
28	}
29	else
30	{
31		$('.top-search-bottom-menu .search-modal__form1').insertBefore('.top-search-bottom-menu .header-call-wrapper');
32	}
33    }
34    
35    $(document).ready(function(){
36    	searchbar();	
37    });
38    
39    $( window ).resize(function() {
40    	searchbar();
41    });

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.