is it possible to apply a script to web pages only if the url begins with?
Right now in my website I use this, where I have ti manually insert each url where I want to hide the .title-shop:
<script>jQuery( document ).ready(function() {console.log( "ready!" );var hideUrl= ['https://www.gustotosto.it/shop/aiadema/','https://www.gustotosto.it/shop/aromiinpiazza/',];if(hideUrl.indexOf(window.location.href)>=0){jQuery('.title-shop').hide();}});</script>
I’d like to modify the script so that all the .title-shop of the urls beginning with https://www.gustotosto.it/shop/ will be hidden.
Is it possible?