Last active
October 30, 2025 22:43
-
-
Save quanon/33c672e61606d71ffd0a3854fd411730 to your computer and use it in GitHub Desktop.
ネストのお気に入りページで売り切れの商品をわかりやすくする UserScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Make out-of-stocks clear | |
| // @version 0.1.0 | |
| // @description Set the background color of out-of-stock items to gray | |
| // @author QUANON | |
| // @match https://www.makeshop.jp/ssl/mypage/favorite.html | |
| // ==/UserScript== | |
| (() => { | |
| 'use strict'; | |
| const items = document.querySelectorAll('.favorite-list-item'); | |
| items.forEach((item) => { | |
| if (item.textContent.indexOf('品切れ') !== -1) { | |
| item.style.backgroundColor = '#e0e0e0'; | |
| const yoyoImage = item.querySelector('img'); | |
| yoyoImage.style.filter = 'grayscale(1)'; | |
| const addToCartButton = item.querySelector('[value="カートに入れる"]'); | |
| addToCartButton.remove(); | |
| } | |
| }); | |
| })(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
参考
UserScript の使い方
ヨーヨーショップネスト