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/
/raw/be6d670c5a93c37c4541ffd3f21f90cc/
be6d670c5a93c37c4541ffd3f21f90cc
js
JavaScript
1
2019-06-25T13:36:00
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></span><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

HTML

Custom Twitter share button link

https://twitter.com/share?hashtags=your,hashtags,comma,separated&text=Default tweet text&via=Screen name of the user to attribute the tweet to
https://snipt.net/embed/24493793a19e82f02955b1d6207d68ac/
/raw/24493793a19e82f02955b1d6207d68ac/
24493793a19e82f02955b1d6207d68ac
html
HTML
1
2019-06-26T08:39:08
True
False
False
/api/public/snipt/40086/
custom-twitter-share-link
<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></span><span id="L-1"><a name="L-1"></a>https://twitter.com/share?hashtags=your,hashtags,comma,separated<span class="err">&amp;</span>text=Default tweet text<span class="err">&amp;</span>via=Screen name of the user to attribute the tweet to </span></pre></div> </td></tr></table>
html, twitter