-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
95 lines (78 loc) · 3.11 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WebLNP</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI=" crossorigin="" />
<link rel="stylesheet" href="res/index.css">
<link rel="stylesheet" href="kml/Testing/style.css">
<link rel="shortcut icon" href="meta/icon.png" type="image/png">
</head>
<body>
<div id="map"></div>
<div class="container mobile_hide mobile" style="top: 15px; right: 15px;" id="search_btn_container">
<button class="i18n" id="show_search_window">search.display_window</button>
</div>
<div class="container" style="top: 15px; right: 15px;" id="search_container">
<div class="citysearch window">
<input type="text" id="citysearch_input" class="i18n_placeholder" placeholder="search.placeholder">
<div class="ct"><b class="i18n">search.results</b></div>
<div id="citysearch_results">
</div>
</div>
</div>
<div class="container hide" id="variant_container">
<div class="variantsel window">
<div style="margin-bottom: 6px;"><b class="i18n">options.title</b></div>
<select id="variantSel">
<option class="i18n">options.layer.default</option>
</select>
<button id="variantSet" class="i18n">options.save</button>
</div>
</div>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM=" crossorigin=""></script>
<script src="res/L.KML.js"></script>
<script src="res/utils.js"></script>
<script src="res/i18n.js"></script>
<script type="module">
import { Octokit } from "https://cdn.skypack.dev/@octokit/core"
const client_token = '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'
let gh = new Octokit({ auth: client_token })
function create_issue(title, body) {
gh.request('POST /repos/{owner}/{repo}/issues', {
owner: 'samuel-302',
repo: 'weblnp',
title: title,
body: body,
assignees: [
'samuel-302'
],
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
})
}
window.onerror = (msg, url, line, col, err) => {
const canReport = confirm(tryTranslation('error.confirm_upload'))
if (!canReport) return
create_issue(`(${err.name}) ${err.message}`, `### Meta
Name: ${err.name}
Message: ${err.message}
Line: ${line}:${col}
### Stack
\`\`\`
${err.stack}
\`\`\``)
}
function error_handler_unit_test() {
throw new TypeError('unit test')
}
// error_handler_unit_test()
</script>
<script src="res/index.js"></script>
</body>
</html>