Skip to content

Instantly share code, notes, and snippets.

@sgqy
Created December 1, 2023 11:41
Show Gist options
  • Save sgqy/54bef264393703400c0735a81d516eca to your computer and use it in GitHub Desktop.
Save sgqy/54bef264393703400c0735a81d516eca to your computer and use it in GitHub Desktop.
$('li.search_result_img_box_inner').each((i, e) => {
$(e).css('background', '')
$(e).css('opacity', '')
v = $(e).find('span.strike').text().replace(/[,円]/g, '')
p = Number(v)
cx = Math.min(Math.max(0, Math.floor(p / 500)), 16).toString(16)
$(e).css('background', `#f${cx}4`)
b = $(e).find('ul[data-is_bought=true]')
if (b.length > 0) {
$(e).css('opacity', '0')
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment