I'm completely new to scripting and i'm having an awful time trying to create a script so that it automatically clicks an Add to Cart button on the webpage once I visit it. An example on the website is the item https://www.therealreal.com/products/women/outerwear/jackets/chanel-jacket-931420. Ive tried using the following script
<script src=http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.8.0.js
type=text/javascript>/script>
<script type=text/javascript>
$(function(){
setTimeout(function() {
$(add-to-cart-button).trigger('click');
},1);
});
</script>
But there was no luck. If someone could help me create a script that would automatically click the add to cart button once I visit any item on the website I would be extremely grateful and would even be willing to pay for this script. Oh also im on a mac if it makes a difference.