-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
102 lines (101 loc) · 4.57 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!--
File: index_en.html
Author: Peter Nilsson (@ittykeys)
Date: March 18, 2024
License: © 2024 Peter Nilsson, released under the GPLv3 License. See LICENSE file for details.
Description: Main html, Swedish
-->
<!DOCTYPE html>
<html lang="sv">
<head>
<meta charset="UTF-8" />
<title>Skåneresa</title>
<script>
function generateNonce() {
var charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var result = '';
for (var i = 0; i < 32; i++) {
result += charset.charAt(Math.floor(Math.random() * charset.length));
}
return result;
}
var nonce = generateNonce();
var cspMeta = document.createElement('meta');
cspMeta.setAttribute('http-equiv', 'Content-Security-Policy');
cspMeta.setAttribute('content', "script-src 'nonce-" + nonce + "' www.googletagmanager.com 'self' code.jquery.com");
document.head.appendChild(cspMeta);
function setNonceForScripts(nonce) {
var scripts = document.querySelectorAll('script[nonce]');
for (var i = 0; i < scripts.length; i++) {
scripts[i].setAttribute('nonce', nonce);
}
}
setNonceForScripts(nonce);
</script>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Cache-control" content="public" />
<meta name="description" content="Skåneresa" />
<meta name="keywords" content="Skåneresa" />
<meta name="author" content="Peter Nilsson" />
<meta name="HandheldFriendly" content="true" />
<meta name="robots" content= "index, follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no">
<meta name="theme-color" content="#ba0053">
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="apple-touch-icon" href="img/icon.png"/>
<link rel="icon" href="img/icon.ico" type="image/x-icon" />
<link rel="manifest" href="manifest.json">
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="js/notification_sv.js"></script>
<script src="js/nicknames.js"></script>
<script src="js/main.js"></script>
<script src="js/darkmode.js"></script>
</head>
<body>
<noscript>
<p>JavaScript är avstängt. Aktivera JavaScript i din webbläsares inställningar för att fortsätta.</p>
</noscript>
<div id="loader" class="hidden"></div>
<div class="container hidden" id="content">
<div id="main">
<a href="en"><img id="langswitch" src="img/us.svg" alt="US flag" title="Switch to English"></a>
<span class="darkModeIcon"></span>
<label class="switch">
<input type="checkbox" id="darkModeSwitch">
<span class="slider round"></span>
</label>
<h1><a href="">Skåneresa</a></h1>
<div id="search">
<input id="from" type="text" placeholder="Från"/>
<input id="to" type="text" placeholder="Till"/>
<div id="buttons">
<input type="button" id="searchButton" value="Sök" />
<input type="button" id="reset" value="Återställ" />
</div>
</div>
<div id="Notification" class="notification">
<span id="notificationMessage"></span>
<button id="closeNotification">OK</button>
</div>
</div>
<div id="result">
<table border="1" id="timeTableDeparture">
<tr>
<th scope="col">Avgång, Spår</th>
<th scope="col">Ankomst, Spår</th>
<th scope="col">Operatör</th>
<th scope="col">Info</th>
</tr>
</table>
</div>
<div id="deviationOverlay"></div>
<div id="deviationModal">
<p id="deviationModalBody"></p>
<button id="closeModal">OK</button>
</div>
<div id="error"></div>
</div>
<a id="github" href="https://github.com/ittykeys/skaneresa.se" target="_blank"></a>
</body>
</html>