I want to hide the comments with some words inside by a (Tampermonkey) user script. As an example, I tried to apply a script
// ==UserScript==
// @name Hide CNN
// @match http://www.cnn.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @grant GM_addStyle
// @run-at document-end
// ==/UserScript==
$('div.post-body:contains("Abbas")').hide()
to the page http://www.cnn.com/2014/07/08/world/meast/mideast-tensions/index.html?hpt=hp_t1 with the following code for posts
<div class="post-body">
<header>
...
</header>
<div class="post-body-inner">
<div class="post-message-container" data-role="message-container">
<div class="publisher-anchor-color" data-role="message-content">
<div class="post-message " data-role="message" dir="auto">
<p>Abbas is nothing but puppet dog of Western savages and Nazis who want to enslave entire world.</p>
</div>
...
</div>
But the script does not seem to do anything. What am I doing wrong? Is it possible at all to filter a dynamically-loaded part of a webpage with a user script?
UPD: The problem is that comments are loaded in the iframe from another domain. How do I hide a child node of such an iframe with Tampermonkey? Do I need to use GM_xmlhttpRequest
somehow?