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: