// // footer.parentNode.insertBefore(div, footer); // const iframe = document.createElement(`iframe`); // iframe.style.width = `100%`; // iframe.style.border = `none`; // iframe.classList.add(`styled-calendar-container`); // iframe.setAttribute(`data-cy`, `calendar-embed-iframe`); // iframe.src=`https://embed.styledcalendar.com/?_=1#C7bufjcWW9ysaejmxZJb`; // iframe.addEventListener(`load`, () => { // const script = document.createElement(`script`); // script.type = `module`; // script.src = `https://embed.styledcalendar.com/assets/parent-window.js`; // document.body.appendChild(script); // }); // footer.parentNode.insertBefore(iframe, footer); // // // // // } // } // if (/^\/member_digital_product_detail/.test(location.pathname)) { // const container = document.querySelector(`.digital_product_detail_container`); // const list = document.querySelector(`#main_point_container`); // if (container && list) { // container.appendChild(list); // } // // 短視頻加速器 // const douyin = document.querySelector(`iframe[src*="https://open.douyin.com"]`); // if (douyin) { // const w = window.screen.availWidth; // const h = Math.ceil(w * 1.77); // douyin.style.width = w + `px`; // douyin.style.height = h + `px`; // } // } if (/^\/member_card/.test(location.pathname)) { const div = document.createElement(`div`); div.innerHTML = await fetch(`/member_reward_wallet`).then(r => r.text()); const walletAmount = div.querySelectorAll(`.info.ds_main_color .info_content`)[2].innerText; const walletDiv = document.createElement(`div`); walletDiv.className = `member_reward_wallet` walletDiv.innerHTML = ` 會員分潤錢包 : ${walletAmount}`; const cashDiv = document.querySelector(`.member_cash`); cashDiv.parentNode.insertBefore(walletDiv, cashDiv) } if (/^\/member_bank_cash/.test(location.pathname)) { document.querySelectorAll(`.table_list tr td:nth-child(3)`).forEach(td => td.innerText = td.innerText.replace(`【人工調整】`, ``)); document.querySelector(`.table_list caption`).innerText = `時髦局獎金明細記錄`; // let positive = 0; // let negative = 0; // document.querySelectorAll(`.table_list tr td:nth-child(1)`).forEach(td => { // const n = parseFloat(td.innerText); // n > 0 ? positive += n : negative += n; // // if (n < 0) { // // td.innerText = `(${-n})`; // // } // }); // document.querySelector(`.table_modify`).innerHTML = // `