Click doesn't work on this Google Translate button? <p>I am creating an Tampermonkey userscript that would automatically click the "star" button on Google Translate website and save my searches so that I can later view them and rehearse.</p> <p>This is the button that I am targeting: <a href="https://i.stack.imgur.com/KnVg0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KnVg0.png" alt="enter image description here"></a></p> <p>This is what I've got so far:</p> <pre><code>// @match https://translate.google.com/#en/de/appetit/ var el = document.getElementById("gt-pb-star"); setTimeout(function(){ el.click(); },4000); </code></pre> <p>I encountered 2 problems.</p> <ol> <li><code>@match</code> should be every translate.google.com search and not just appetit. How do I specify the whole domain?</li> <li>I tried clicking the "star" button with click() method but it doesn't work. Not sure why.</li> </ol> <p>Can you please help me finish this userscript?</p> <p>Edit: it seems that setting <code>match</code> to <code>https://translate.google.com/</code> handles the first question. Still don't know why click() doesn't work.</p>