snipt

Ctrl+h for KB shortcuts

JavaScript

Highlight all div elements on page

javascript:var%20eL=document.getElementsByTagName('div');for(i=0;i%3CeL.length;i++)%7Bvoid(eL%5Bi%5D.style.border='solid%201px%20red')%7D
https://snipt.net/embed/421403ebcd22826355affd469c29f583/
/raw/421403ebcd22826355affd469c29f583/
421403ebcd22826355affd469c29f583
js
JavaScript
1
2019-06-18T08:09:47
True
False
False
/api/public/snipt/14513/
highlight-all-div-elements-on-page-using-a-specified-colour
<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="kd">var</span><span class="o">%</span><span class="mi">20</span><span class="nx">eL</span><span class="o">=</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s1">&#39;div&#39;</span><span class="p">);</span><span class="k">for</span><span class="p">(</span><span class="nx">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span><span class="nx">i</span><span class="o">%</span><span class="mi">3</span><span class="nx">CeL</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span><span class="nx">i</span><span class="o">++</span><span class="p">)</span><span class="o">%</span><span class="mi">7</span><span class="nx">Bvoid</span><span class="p">(</span><span class="nx">eL</span><span class="o">%</span><span class="mi">5</span><span class="nx">Bi</span><span class="o">%</span><span class="mi">5</span><span class="nx">D</span><span class="p">.</span><span class="nx">style</span><span class="p">.</span><span class="nx">border</span><span class="o">=</span><span class="s1">&#39;solid%201px%20red&#39;</span><span class="p">)</span><span class="o">%</span><span class="mi">7</span><span class="nx">D</span> </span></pre></div> </td></tr></table>
bookmarklet, display, div, dom, element, favelet, highlight, javascript, js

Bash

display characters

od -a <file>
https://snipt.net/embed/8aec1ff81eb1b40e7be76c3103ac7755/
/raw/8aec1ff81eb1b40e7be76c3103ac7755/
8aec1ff81eb1b40e7be76c3103ac7755
bash
Bash
1
2019-06-09T20:45:19
True
False
False
/api/public/snipt/9268/
display-characters
<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>od -a &lt;file&gt; </span></pre></div> </td></tr></table>
characters, display, individual

JavaScript

show content based on date

1
2
3
4
5
6
<script type="text/javascript">
	var myDate=new Date();
	myDate.setFullYear(2009,5,7);
	var today = new Date();
	if (today>myDate){document.getElementById('hidden').style.display = 'none';}
</script>
https://snipt.net/embed/782b5aa9783653194215d470f5078eee/
/raw/782b5aa9783653194215d470f5078eee/
782b5aa9783653194215d470f5078eee
js
JavaScript
6
2019-06-18T07:00:03
True
False
False
/api/public/snipt/6296/
show-content-based-on-date
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="o">&lt;</span><span class="nx">script</span> <span class="nx">type</span><span class="o">=</span><span class="s2">&quot;text/javascript&quot;</span><span class="o">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="kd">var</span> <span class="nx">myDate</span><span class="o">=</span><span class="k">new</span> <span class="nb">Date</span><span class="p">();</span> </span><span id="L-3"><a name="L-3"></a> <span class="nx">myDate</span><span class="p">.</span><span class="nx">setFullYear</span><span class="p">(</span><span class="mi">2009</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">7</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a> <span class="kd">var</span> <span class="nx">today</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Date</span><span class="p">();</span> </span><span id="L-5"><a name="L-5"></a> <span class="k">if</span> <span class="p">(</span><span class="nx">today</span><span class="o">&gt;</span><span class="nx">myDate</span><span class="p">){</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">&#39;hidden&#39;</span><span class="p">).</span><span class="nx">style</span><span class="p">.</span><span class="nx">display</span> <span class="o">=</span> <span class="s1">&#39;none&#39;</span><span class="p">;}</span> </span><span id="L-6"><a name="L-6"></a><span class="o">&lt;</span><span class="err">/script&gt;</span> </span></pre></div> </td></tr></table>
date, display, javascript