Find Your Profile: A Hat Size Guide From Low to High (2024)

'; html += '

'; html += '' + color + '

'; } } html += show_more_swatch_html; html += ''; if (swatch) { // item.insertAdjacentHTML( 'beforeend', html ); let inner_selector_string = ''; if (isprimaryselector) { inner_selector_string = 'div[product-selector]'; atag.insertAdjacentHTML('beforeend', html); let innermost_item = atag; innermost_item.setAttribute('prod-id', availproduct.id); innermost_item.classList.add('csp-init-grid-item'); innermost_item.setAttribute('csp-swatch-added', 'true'); } else { inner_selector_string = '.product-card__price-wrapper, .product-card__price, .card-information,.grid-view-item,.grid-product__wrapper, .product-item--price, .product__prices, a.grid-link,.product-item-price,a.productitem--image-link,a.ProductItem__Wrapper,.product-item__media a,a.stretched-link,a.product_card,.product_image a,.yv-product-card-img a'; let sec_inner_selector = item.querySelector(inner_selector_string); if (sec_inner_selector) { sec_inner_selector.insertAdjacentHTML('beforeend', html); let innermost_item = sec_inner_selector.closest(out_selector_string); innermost_item.setAttribute('prod-id', availproduct.id); innermost_item.classList.add('csp-init-grid-item'); innermost_item.setAttribute('csp-swatch-added', 'true'); } } } else {} } } } } } } if (i == items.length - 1) { renderingswatchesflag = 1; } } if (renderingswatchesflag == 1) { var jsondata = window.jsondata; var items = document.getElementsByClassName("csp-swatch-item"); var swatch_layout_type_class = "csp_layout_" + jsondata.setting.layout_type; var swatch_border_size_class = "csp_swatch_border_size_color_" + jsondata.setting.swatch_border_size; var swatch_border_spacing_class = "csp_swatch_border_spacing_" + jsondata.setting.swatch_border_spacing; var swatch_hover_effect_class = "csp_swatch_hover_effect_" + jsondata.setting.swatch_hover_effect; var swatch_image_position_class = "csp_swatch_image_postion_" + jsondata.setting.swatch_image_position; var swatch_image_zoom = "csp__swatch_zoom_" + jsondata.setting.swatch_image_zoom; var variant_as_swatch = parseInt(jsondata.setting.variant_image_as_swatch); for (var i = 0; i < items.length; i++) { item = items.item(i); var name = item.getAttribute('data-name') var p_id = item.getAttribute('data-prod'); var optvalue = item.getAttribute('data-value'); optvalue = optvalue.toLowerCase(); name = name.replace("cap_", ""); let productdata = ''; let globaldata = ''; if (jsondata.individual) { productdata = jsondata.individual[p_id]; } if (jsondata.global) { globaldata = jsondata.global; }// var globaldata = jsondata.global;// var labelseletor = 'label_'+p_id+'_'+optvalue;// var labelseletor = 'label_'+p_id+'_'+item.getAttribute('data-value')// var label = document.getElementsByClassName('swatch'); var labelseletor = 'label_' + p_id + '_' + name + '_' + item.getAttribute('data-value').replace(/ /g, "_"); labelseletor = labelseletor.replace(/ /g, "_").toLowerCase(); labelseletor = labelseletor.replace(/\\([\s\S])|(")/g, "_"); var label = document.getElementById(labelseletor); var getimg = ''; if (label) { getimg = label.getAttribute('data-img'); } var swatch_innerselector = 'csp_swatch_ui_' + p_id + '_' + name + '_' + item.getAttribute('data-value'); swatch_innerselector = swatch_innerselector.replace(/ /g, "_").toLowerCase().replace(/\\([\s\S])|(")/g, "_"); var swatch_inner = document.getElementById(swatch_innerselector); var swatch_adjacent_text_divselector = 'csp_swatch_ajdtext_' + p_id + '_' + name + '_' + item.getAttribute('data-value'); swatch_adjacent_text_divselector = swatch_adjacent_text_divselector.replace(/ /g, "_").toLowerCase().replace(/\\([\s\S])|(")/g, "_"); var swatch_adjacent_text_div = document.getElementById(swatch_adjacent_text_divselector); var more_swatch_icon_selector = 'csp_show_more_' + p_id + '_swatch'; var more_swatch_icon = document.getElementById(more_swatch_icon_selector); label.classList.add(swatch_layout_type_class, swatch_border_spacing_class, swatch_hover_effect_class); swatch_inner.classList.add(swatch_image_zoom, swatch_image_position_class); if (more_swatch_icon) { more_swatch_icon.classList.add(swatch_layout_type_class, swatch_border_spacing_class); } if (variant_as_swatch) { swatch_inner.style.backgroundImage = 'url("' + getimg + '")'; swatch_inner.style.backgroundSize = 'cover'; } else if (productdata && productdata[name] && productdata[name][optvalue]) { var valuedata = productdata[name][optvalue]; swatch_inner.style.color = "#fff"; if (valuedata.value_type == 'monocolor') { swatch_inner.style.backgroundColor = "#" + valuedata.option_value; } else if (valuedata.value_type == 'dualtone') { var color1 = valuedata.option_value; var color2 = valuedata.option_value2; swatch_inner.style.background = "-moz-linear-gradient(top, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%)"; swatch_inner.style.background = "-webkit-gradient(left top, left bottom, color-stop(0%, #" + color1 + "), color-stop(50%, #" + color1 + "), color-stop(50%, #" + color2 + "), color-stop(100%, #" + color2 + "))"; swatch_inner.style.background = "-webkit-linear-gradient(top, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%)"; swatch_inner.style.background = "-o-linear-gradient(top, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%"; swatch_inner.style.background = "-ms-linear-gradient(top, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%"; swatch_inner.style.background = "linear-gradient(to bottom, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%)"; swatch_inner.style.background = "linear-gradient(to bottom, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%)"; swatch_inner.style.filter = "progid:DXImageTransform.Microsoft.gradient( startColorstr='#" + color1 + "', endColorstr='#" + color2 + "',GradientType=0 )"; } else { // label.style.backgroundImage = 'url('+valuedata.option_value+')'; if (! valuedata.option_value.includes('https:/')) { swatch_inner.style.backgroundImage = 'url("https://collection-swatch-pug-aws-bucket.s3.us-east-2.amazonaws.com/' + valuedata.option_value + '")'; } else { swatch_inner.style.backgroundImage = 'url(' + valuedata.option_value + ')'; } swatch_inner.style.backgroundSize = 'cover'; }// global product data } else if (globaldata && globaldata[name] && globaldata[name][optvalue]) { var valuedata = globaldata[name][optvalue]; swatch_inner.style.backgroundColor = "#" + valuedata.option_value swatch_inner.style.color = "#fff"; if (valuedata.value_type == 'monocolor') { swatch_inner.style.backgroundColor = "#" + valuedata.option_value; } else if (valuedata.value_type == 'dualtone') { var color1 = valuedata.option_value; var color2 = valuedata.option_value2; swatch_inner.style.background = "-moz-linear-gradient(top, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%)"; swatch_inner.style.background = "-webkit-gradient(left top, left bottom, color-stop(0%, #" + color1 + "), color-stop(50%, #" + color1 + "), color-stop(50%, #" + color2 + "), color-stop(100%, #" + color2 + "))"; swatch_inner.style.background = "-webkit-linear-gradient(top, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%)"; swatch_inner.style.background = "-o-linear-gradient(top, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%"; swatch_inner.style.background = "-ms-linear-gradient(top, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%"; swatch_inner.style.background = "linear-gradient(to bottom, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%)"; swatch_inner.style.background = "linear-gradient(to bottom, #" + color1 + " 0%, #" + color1 + " 50%, #" + color2 + " 50%, #" + color2 + " 100%)"; swatch_inner.style.filter = "progid:DXImageTransform.Microsoft.gradient( startColorstr='#" + color1 + "', endColorstr='#" + color2 + "',GradientType=0 )"; } else { if (! valuedata.option_value.includes('https:/')) { swatch_inner.style.backgroundImage = 'url("https://collection-swatch-pug-aws-bucket.s3.us-east-2.amazonaws.com/' + valuedata.option_value + '")'; } else { swatch_inner.style.backgroundImage = 'url(' + valuedata.option_value + ')'; } swatch_inner.style.backgroundSize = 'cover'; } } else {} } // swatch li item forloop end } // if renderswatchfinished } // if item ends here if (swatch_text_layout == 'swatch_name_on_hover') { productlist = document.querySelectorAll('.csp-swatch-item:not(.tooltip-init-yes)'); for (var i = 0; i < productlist.length; i++) { tippy(productlist[i], { placement: jsondata.setting.swatch_tooltip_position, arrow: true }); productlist[i].classList.add('tooltip-init-yes'); } } } }/* csp_swatch_render ends here */ async function getproducts(href) { const requestOptions = { method: 'GET' }; let isItTrue = await fetch('https://' + window.domain + '/products/' + href + '.json', requestOptions).then( response => response.ok == true ? response.json() : '' ).then(data => { if (data) { return data; } }); return isItTrue; } function hasSomeParentTheAttr(element, attrname, parentnodecount) { if (element && parentnodecount < 5) { if (element.hasAttribute(attrname)) { return true }; return element.parentNode && hasSomeParentTheAttr(element.parentNode, attrname, parentnodecount + 1); } } function hasSomeChildTheAttr(element, attrname, childnodecount) { if (element && childnodecount < 5) { if (element.hasAttribute(attrname)) { return true }; return element.childNodes[0] && hasSomeChildTheAttr(element.children[0], attrname, childnodecount + 1); } } function removeSelfClass(className) { var elements = document.getElementsByClassName(className); while (elements.length > 0) { elements[0].classList.remove(className) } } function isHidden(el) { return(el.offsetParent === null) } function handleCollectionClick(e) { var imgsrc = e.getAttribute('data-img'); if (imgsrc) { var prodid = e.getAttribute('data-prod'); var ele = document.querySelector('[prod-id="' + prodid + '"]'); if (ele) { dimg = ele.getElementsByTagName('img')[0]; secondryimg = ele.getElementsByTagName('img')[1]; bg_set = ele.querySelectorAll('[data-bgset]'); pnode = bg_set[0]; snode = bg_set[1]; if (dimg && ! isHidden(dimg)) { // console.log('found img', dimg); dimg .setAttribute('src', imgsrc) dimg .setAttribute('srcset', imgsrc) dimg .style .backgroundImage = 'url("' + imgsrc + '")'; } if (secondryimg && ! isHidden(secondryimg)) { secondryimg .setAttribute('src', imgsrc) secondryimg .setAttribute('srcset', imgsrc) secondryimg .style .backgroundImage = 'url("' + imgsrc + '")'; } if (pnode) { pnode .setAttribute('src', imgsrc) pnode .setAttribute('srcset', imgsrc) pnode .setAttribute('data-bgset', imgsrc) pnode .style .backgroundImage = 'url("' + imgsrc + '")'; } if (snode) { snode .setAttribute('src', imgsrc) snode .setAttribute('srcset', imgsrc) snode .setAttribute('data-bgset', imgsrc) snode .style .backgroundImage = 'url("' + imgsrc + '")'; } } }// var value = e.value; var value = e.getAttribute('data-value');// var name = e.name; var name = e.getAttribute('data-name'); if (name) { name = name.replace("csp_", ""); } var elements = document.getElementsByName(name); elements.forEach(function(input) { if (input.value == value) { input.checked = true; } const event = new Event("change", { view: window, bubbles: true, cancelable: true }); input.dispatchEvent(event); }); var element = e.getAttribute('id'); removeSelfClass('csp_active_swatch'); var active = e.classList.add("csp_active_swatch"); return false; } window.addEventListener("load", function() { window.CSP = window.CSP || {}; window.dispatchEvent(new Event('resize')); if (window.jsondata) { var settings = window.jsondata.setting; var jsondata = window.jsondata; } if (settings.collection_page_swatch == 1 && settings.swatch_option != 'undefined' && settings.swatch_option != 'null' && settings.swatch_option != '') { var opt = settings.swatch_option; }// checkifproducts(); var nodes = document.querySelectorAll("div.grid-item, div.grid__item.grid-product, li.featured-collections__item, li.grid__item, div.grid__item, div[product-selector],li.productgrid--item,div.Grid__Cell,div.main-div,div.box,div.product-wrap, div.yv-product-card"); window.CSP.first_selector = nodes[0]; window.CSP.last_selector = nodes[nodes.length - 1]; window.CSP.selectors_count = nodes.length; var selectors_count_new = window.CSP.selectors_count; var first_selector_new = window.CSP.first_selector; var last_selector_new = window.CSP.last_selector; setInterval(function() { console.log('checking new products'); let nodes = document.querySelectorAll("div.grid-item, div.grid__item.grid-product, li.featured-collections__item, li.grid__item, div.grid__item, div[product-selector],li.productgrid--item,div.Grid__Cell,div.main-div,div.box,div.product-wrap, div.yv-product-card"); selectors_count_new = nodes.length; first_selector_new = nodes[0]; last_selector_new = nodes[nodes.length - 1]; if (selectors_count_new != window.CSP.selectors_count && window.location.href.indexOf("/pages/") < 0) { checkifproducts(); window.CSP.selectors_count = selectors_count_new; } if (first_selector_new != '' && window.location.href.indexOf("/pages/") < 0) { if (first_selector_new != window.CSP.first_selector || last_selector_new != window.CSP.last_selector) { window.CSP.selectors_count = selectors_count_new; checkifproducts(); } } window.CSP.first_selector = first_selector_new; window.CSP.last_selector = last_selector_new; window.CSP.selectors_count = selectors_count_new; }, 5000); });

Find Your Profile: A Hat Size Guide From Low to High (2024)
Top Articles
Latest Posts
Article information

Author: Barbera Armstrong

Last Updated:

Views: 5729

Rating: 4.9 / 5 (59 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Barbera Armstrong

Birthday: 1992-09-12

Address: Suite 993 99852 Daugherty Causeway, Ritchiehaven, VT 49630

Phone: +5026838435397

Job: National Engineer

Hobby: Listening to music, Board games, Photography, Ice skating, LARPing, Kite flying, Rugby

Introduction: My name is Barbera Armstrong, I am a lovely, delightful, cooperative, funny, enchanting, vivacious, tender person who loves writing and wants to share my knowledge and understanding with you.