snipt

Ctrl+h for KB shortcuts

JavaScript

Remove Twitter Ads and Promotions

javascript:($(function(){$("div.promoted-tweet").each(function(){$(this).parent().remove()});$("div.promoted-account").each(function(){$(this).remove()});$("li.promoted-trend").each(function(){$(this).remove()})}))
https://snipt.net/embed/be6d670c5a93c37c4541ffd3f21f90cc/
https://snipt.net/raw/be6d670c5a93c37c4541ffd3f21f90cc/
be6d670c5a93c37c4541ffd3f21f90cc
js
JavaScript
1
2016-09-26T23:48:09
True
False
False
/api/public/snipt/53832/
remove-twitter-ads-and-promotions
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nx">javascript</span><span class="o">:</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="kd">function</span><span class="p">(){</span><span class="nx">$</span><span class="p">(</span><span class="s2">&quot;div.promoted-tweet&quot;</span><span class="p">).</span><span class="nx">each</span><span class="p">(</span><span class="kd">function</span><span class="p">(){</span><span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">parent</span><span class="p">().</span><span class="nx">remove</span><span class="p">()});</span><span class="nx">$</span><span class="p">(</span><span class="s2">&quot;div.promoted-account&quot;</span><span class="p">).</span><span class="nx">each</span><span class="p">(</span><span class="kd">function</span><span class="p">(){</span><span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">remove</span><span class="p">()});</span><span class="nx">$</span><span class="p">(</span><span class="s2">&quot;li.promoted-trend&quot;</span><span class="p">).</span><span class="nx">each</span><span class="p">(</span><span class="kd">function</span><span class="p">(){</span><span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">remove</span><span class="p">()})}))</span> </span></pre></div> </td></tr></table>
javascript, jquery, twitter
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.