PageSourceSearch

https://www.mccormick.com/cdn/shop/t/2/assets/power-reviews-DmEQbMvq.js

js mccormick.com collected 2026-09-24 08:45:10 UTC 2,091 bytes, 1 lines download raw bytes

1import{r as v,t as m,n as s}from"./index-DS8uTh6M.js";import{a as h}from"./apps-D_nDLyRB.js";import{s as g}from"./shouldAnimate-CeW36j6E.js";import"./intersection-watcher-DADyd6E-.js";import"./media-queries-CokWIw5y.js";import"./delay-offset-CTJE-YpR.js";const i={prReviewDisplay:"#pr-reviewdisplay",prQuestionDisplay:"#pr-questiondisplay",prReview:".pr-review",prPagination:".pr-rd-pagination",prFlagReviewButton:".pr-rd-flag-review-btn",prShowMoreButton:".pr-qa-display-show-more-questions",prReviewImageNoCaption:".pr-rd-image-container.pr-rd-no-caption"};v("power-reviews",{onLoad(){g(this.container)&&(this.animateApps=h(this.container)),this.handlePowerReviews()},async findElementsAsync(e=document,a,w=500,t=10){let p,l=0;return new Promise((o,n)=>{p=setInterval(()=>{l++;const r=e.querySelectorAll(a);r.length&&(clearInterval(p),o(r)),l>=t&&(clearInterval(p),console.warn(`Element ${a} not found!`),o([]))},w)})},async handlePowerReviews(){const e=await this.findElementsAsync(this.container,i.prReviewDisplay);if(e&&e[0]){const t=m(i.prReview,e[0]),p=s(i.prPagination,e[0]);if(t.length&&t.forEach(o=>{const n=s(i.prFlagReviewButton,o);this.updateButtonAttributes(n);const r=s(i.prReviewImageNoCaption,o);this.handleReviewImageNoCaption(r)}),!p)return;new MutationObserver(o=>{o.forEach(n=>{var r,d;if((d=(r=n.addedNodes[0])==null?void 0:r.classList)!=null&&d.contains("pr-review")){const c=s(i.prFlagReviewButton,n.addedNodes[0]);this.updateButtonAttributes(c);const u=s(i.prReviewImageNoCaption,n.addedNodes[0]);this.handleReviewImageNoCaption(u)}})}).observe(e[0],{childList:!0,subtree:!0})}const a=await this.findElementsAsync(this.container,i.prQuestionDisplay);if(a&&a[0]){const t=s(i.prShowMoreButton,a[0]);t&&t.setAttribute("aria-label","Show more Q&A")}document.querySelectorAll(".pr-rd-image-container").forEach(t=>{t.setAttribute("aria-label","Review image")})},updateButtonAttributes(e){e&&e.setAttribute("aria-haspopup","dialog")},handleReviewImageNoCaption(e){e&&e.setAttribute("aria-label","Review image")},onUnload(){var e;(e=this.animateApps)==null||e.destroy()}});

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.