title: Close a popup modal
body: <p>I have been attempting to get greasemonkey to close a modal by clicking the "x" button. Here is the code for the page.</p>
  
  <pre><code>&lt;div class="modal-header"&gt;
  &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true" onClick="window.location.reload()"&gt;x&lt;/button&gt;
  </code></pre>
  
  <p>I've tried using <code>document.querySelector('.close').click()</code> but to no avail. Where am I going wrong here?</p>
  
  <p>The page in question is running javascript and ajax.</p>