1class ScriptTab extends Script { 2 constructor(params) { 3 super(params) 4 this.$dom = document.querySelector(`#${this.attrId}`) 5 } 6 async init() { 7 this.setPageShowStatus() 8 } 9 /** è®¾ç½®ææ£é¡µé¢tabæ¾ç¤ºç¶æ */ 10 setPageShowStatus() { 11 // 妿å½åæ¯ææ£é¡µé¢ 12 if (window.app.info.page.page_type === 'product_discount_now') { 13 const $now = this.$dom.querySelector('[tab-index="0"]') 14 if ($now) $now.classList.add('active') 15 } else if (window.app.info.page.page_type === 'product_discount_upcoming') { 16 const $upcoming = this.$dom.querySelector('[tab-index="1"]') 17 if ($upcoming) $upcoming.classList.add('active') 18 } 19 } 20}
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.