I've had many lucy tools over the years, but this one is too flexible to use. The edge is not the right profile to make a clean trim, back to my old trusty one.
if($('.main-content .right-nav .product-list')[0].previousSibling.textContent.includes('7'))
{
$('.main-content .right-nav .product-list')[0].previousSibling.remove();
}
You may need to surround the script in a script tag if there is not one present in the Script content already, like so: