-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
57 lines (52 loc) · 1.68 KB
/
index.html
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Singapore MRT/LRT Map: Translated</title>
<style type="text/css">
body {
color: #444444;
font-size: 18px;
line-height: 1.6;
max-width: 650px;
padding: 0 10px;
}
h1,
h2,
h3 {
line-height: 1.2;
}
</style>
</head>
<body>
<header>
<h1>Singapore MRT/LRT Map: Translated</h1>
</header>
<p>Click to swap maps.</p>
<img id="mapimg" src="map.svg" onclick="swapMap()">
<footer>
<p><a href="https://github.com/rahulg/singapore-mrt-lrt-translated">Source</a>; CC BY-SA 3.0; Attribution: <a href="https://commons.wikimedia.org/wiki/User:Aforl">Aforl on Wikimedia Commons</a></p>
</footer>
<script type="text/javascript">
function swapMap() {
var elem = document.getElementById('mapimg');
if (elem.src.indexOf('map.svg') != -1) {
elem.src = elem.src.replace('map.svg', 'original.svg');
ga('send', 'event', 'Map', 'click', 'toOriginal');
} else {
elem.src = elem.src.replace('original.svg', 'map.svg');
ga('send', 'event', 'Map', 'click', 'toTranslated');
}
}
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-45585898-2', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>