PageSourceSearch

https://cdn.motowatch.com/theme/edf1f57d1dc038a14bdf7a17bff619a9/j…n-quantity-select-selector.plugin.aa4877.js

js motowatch.com collected 2026-09-24 12:24:07 UTC 1,384 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[61277],{1277:(i,e,t)=>{t.r(e),t.d(e,{default:()=>a});class a extends window.PluginBaseClass{static #i=this.options={ariaLiveUpdates:!0,ariaLiveUpdateMode:"live",ariaLiveTextValueToken:"%quantity%",ariaLiveTextProductToken:"%product%"};init(){this._select=this.el.querySelector("select.js-quantity-selector"),this.options.ariaLiveUpdates&&this._initAriaLiveUpdates(),this._registerEvents()}_initAriaLiveUpdates(){this.ariaLiveContainer=this.el.nextElementSibling,this.ariaLiveContainer&&this.ariaLiveContainer.hasAttribute("aria-live")&&(this.ariaLiveText=this.ariaLiveContainer.dataset.ariaLiveText,this.ariaLiveProductName=this.ariaLiveContainer.dataset.ariaLiveProductName,"onload"===this.options.ariaLiveUpdateMode&&window.setTimeout(this._updateAriaLive.bind(this),1e3))}_registerEvents(){this._select.addEventListener("change",()=>{this._triggerChange()})}_triggerChange(){"live"===this.options.ariaLiveUpdateMode&&this._updateAriaLive()}_updateAriaLive(){if(!this.options.ariaLiveUpdates||!this.ariaLiveText||!this.ariaLiveContainer)return;let i=this._select.value,e=this.ariaLiveText.replace(this.options.ariaLiveTextValueToken,i);this.options.ariaLiveTextProductToken&&this.ariaLiveProductName&&(e=e.replace(this.options.ariaLiveTextProductToken,this.ariaLiveProductName)),this.ariaLiveContainer.innerHTML=e}}}}]);

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.