/
index.slim
34 lines (33 loc) · 1.26 KB
/
index.slim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
doctype html
html
head
title uniformresourcelocatorelongator.com :: combating short URLs since 2012
link href=url("/index.css") rel='stylesheet'
script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript
javascript:
function do_elongate() {
$p = escape($.trim($('#url').val()));
if ($p === '') { return false; }
// TODO: get the elongated URL via ajax
return false;
}
$(function() {
$('#elongate').click(do_elongate);
$('#elongate-form').submit(do_elongate);
});
javascript:
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-361923-7']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
body
.container
img src="/title.png"
.lengthen
form#elongate-form
input#url type='text' placeholder='Enter a URL to elongate'
a#elongate.button href='#' E l o n g a t e