Update item.tpl.html
This commit is contained in:
		| @@ -7,7 +7,7 @@ | |||||||
| </head> | </head> | ||||||
| <body> | <body> | ||||||
|   <div class="id">[ID: {{ id }} | by: {{ username }}]</div> |   <div class="id">[ID: {{ id }} | by: {{ username }}]</div> | ||||||
|   <div class="return"><a href="/" title="return to main">f0ck.me</a></div><br /> |   <div class="return"><a href="/" title="return to main">f0ck.me</a></div> | ||||||
|   <div class="controls">{% if next != null %}<a id="next" href="/{{ next }}"><<-</a> | {% endif %} <a id="random" href="/random" title="Random">random</a> {% if prev != null %} | <a id="prev" href="/{{ prev }}">->></a>{% endif %}</div><br /> |   <div class="controls">{% if next != null %}<a id="next" href="/{{ next }}"><<-</a> | {% endif %} <a id="random" href="/random" title="Random">random</a> {% if prev != null %} | <a id="prev" href="/{{ prev }}">->></a>{% endif %}</div><br /> | ||||||
|   {% if thumb != null %} |   {% if thumb != null %} | ||||||
|   <div class="thumbnail"> |   <div class="thumbnail"> | ||||||
| @@ -33,5 +33,31 @@ | |||||||
|     <span class="channel">channel: {{ userchannel }}</span>  |     <span class="channel">channel: {{ userchannel }}</span>  | ||||||
|     <span class="network">network: {{ usernetwork }}</span> |     <span class="network">network: {{ usernetwork }}</span> | ||||||
|   </div> |   </div> | ||||||
|  |   <script> | ||||||
|  |   function arrowKeys(e) { | ||||||
|  |     switch(e.keyCode) { | ||||||
|  |       case 39: | ||||||
|  |         var prev = document.getElementById('prev'); | ||||||
|  |         if(prev) prev.click(); | ||||||
|  |       break; | ||||||
|  |       case 37: | ||||||
|  |         var next = document.getElementById('next'); | ||||||
|  |         if(next) next.click(); | ||||||
|  |       break; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |   if(document.readyState == 'complete' || document.readyState == 'loaded') | ||||||
|  |     document.addEventListener('keydown', arrowKeys); | ||||||
|  |   else { | ||||||
|  |     if(/Chrome/i.test(navigator.userAgent)) | ||||||
|  |       window.addEventListener('load', function () { | ||||||
|  |         document.addEventListener('keydown', arrowKeys); | ||||||
|  |       }); | ||||||
|  |     else | ||||||
|  |       document.addEventListener('DOMContentLoaded', function () { | ||||||
|  |         document.addEventListener('keydown', arrowKeys); | ||||||
|  |       }); | ||||||
|  |   } | ||||||
|  |   </script> | ||||||
| </body> | </body> | ||||||
| </html> | </html> | ||||||
		Reference in New Issue
	
	Block a user