Skip to content

Instantly share code, notes, and snippets.

@quanon
Last active October 30, 2025 22:43
Show Gist options
  • Select an option

  • Save quanon/33c672e61606d71ffd0a3854fd411730 to your computer and use it in GitHub Desktop.

Select an option

Save quanon/33c672e61606d71ffd0a3854fd411730 to your computer and use it in GitHub Desktop.
ネストのお気に入りページで売り切れの商品をわかりやすくする UserScript
// ==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();
}
});
})();
@quanon
Copy link
Author

quanon commented Oct 30, 2025

参考

UserScript の使い方

ヨーヨーショップネスト

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment