title: Get the contents of a class inside an iframe, with Greasemonkey
body: <p>I have a Greasemonkey script which uses jQuery and detects if a "class" is present in the document.</p>
  
  <pre><code>var damageMessage = $(".mw_error").text();
  </code></pre>
  
  <p>This works fine when the document loads and <code>damageMessage</code> holds a text string.</p>
  
  <p>The problem is that the "class" <code>.mw_error</code> is inside an iframe and when you click a new link inside, the iframe content loads without a page refresh but the contents of "class" do change and I want to get the new contents or text string. </p>
  
  <p>I’m guessing it’s because the document doesn’t reload that the Greasemonkey script doesn’t load again and try and find the updated class contents. Somehow I need to get the new contents of the class.</p>
  
  <p>Any help on this would be much appreciated :)</p>