PageSourceSearch

https://www.yrlighting.com/assets/js/unit/polymerize-more-product.js

js yrlighting.com collected 2026-10-04 07:51:23 UTC 856 bytes, 26 lines download raw bytes

1class ScriptPolymerizeMoreProduct extends Script {
2  constructor(params) {
3    super(params)
4    this.$dom = document.querySelector(`#${this.attrId}`)
5    this.$itemArr = this.$dom.querySelectorAll('.items .item')
6    this.$link = this.$dom.querySelectorAll('.unit-list-category__link')
7  }
8  async init() {
9    this._initEvent()
10  }
11  /** 初始化事件绑定 */
12  _initEvent() {
13    if(this.$itemArr.length) this.$itemArr[0].classList.add('active')
14    for(const $li of this.$link) {
15      $li.addEventListener('click', (e) => {
16        if (e.target.className) {
17          e.preventDefault()
18          const parentNode = $li.parentNode.parentNode
19          const brother = this.utilts.getSiblings(parentNode)
20          parentNode.classList.toggle('active')
21          for (let $el of brother) $el.classList.remove('active')
22        }
23      })
24    }
25  }
26}

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.