2013-04-15 03:10:29 +02:00
|
|
|
!!! 5
|
|
|
|
html(lang='en')
|
|
|
|
head
|
|
|
|
meta(charset='utf-8')
|
|
|
|
script(type="text/javascript", src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js")
|
2013-04-15 03:50:50 +02:00
|
|
|
link(rel="stylesheet", href="/imgurr.css")
|
2013-04-15 03:10:29 +02:00
|
|
|
title random imgur
|
|
|
|
script
|
|
|
|
function wat() {
|
2013-04-15 03:50:50 +02:00
|
|
|
$('#loading').show();
|
|
|
|
$('#image').load(function(){$('#loading').hide(); console.log('loaded')});
|
2013-04-15 03:10:29 +02:00
|
|
|
$.get("/api/imgur/getRandomImage", function(d) {$('#image').attr('src', d.data[0])}, "json");
|
|
|
|
};
|
|
|
|
$(wat());
|
2013-04-15 03:50:50 +02:00
|
|
|
$(document).on('keydown', function(e){(e.which==32)&&(wat()) });
|
2013-04-15 03:10:29 +02:00
|
|
|
body
|
2013-04-15 03:50:50 +02:00
|
|
|
div#loading Loading Image
|
2013-04-15 03:10:29 +02:00
|
|
|
div#container
|
2013-04-15 03:50:50 +02:00
|
|
|
img#image
|