amazonのページにサクラチェッカーを埋め込む
かなり雑に作ったので、iframe内表示領域とか異常系を特に意識していない
必要なchrome extensionをインスコします
設定します
amazonの商品ページ開いてサクラチェッカが表示されたら成功
amazonのページにサクラチェッカーを埋め込む
かなり雑に作ったので、iframe内表示領域とか異常系を特に意識していない
必要なchrome extensionをインスコします
設定します
amazonの商品ページ開いてサクラチェッカが表示されたら成功
window.addEventListener('load', () => { | |
const target = document.querySelector('#averageCustomerReviews_feature_div'); | |
const id = location.pathname.split('/')[3]; | |
if (!id || !target) return; | |
const iframe = document.createElement('iframe'); | |
iframe.src = `https://sakura-checker.jp/search/${id}/`; | |
iframe.setAttribute('frameborder', 0); | |
iframe.style = `width: 100%; height: 600px;`; | |
target.parentNode.insertBefore(iframe, target); | |
}); |