-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.html
73 lines (61 loc) · 2.17 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
<!DOCTYPE html>
<html>
<head lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, interactive-widget=resizes-content" />
<meta name="HandheldFriendly" content="True">
<title>Crossword Nexus Solver</title>
<link href="css/crosswordnexus.css" rel="stylesheet">
<!-- the main crossword JavaScript -->
<script src="js/crosswords.js"></script>
<!-- jQuery -->
<script src="lib/jquery.js"></script>
<!-- for loading crosswords -->
<script src="lib/jscrossword_combined.js"></script>
<!-- for saving crosswords -->
<script src="lib/lscache.min.js"></script>
<!-- for printing -->
<script src="lib/jspdf-2_5_1.min.js"></script>
<script src="lib/xw_pdf.js"></script>
<!-- for dark mode -->
<script src="lib/darkreader.min.js"></script>
<style>
html, body {
/* height: 100%; */
margin: 0;
background-color: white;
}
div.crossword { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
</style>
</head>
<body>
<!-- The div in which the crossword will be created -->
<div class="crossword"></div>
<script>
(function(){
// Grab puzzle from query string if available
var url = new URL(window.location.href);
var puzzle = url.searchParams.get("puzzle");
if (!puzzle) puzzle = url.searchParams.get("file");
// optional puzzle parameters
// for options, see line 141 in crosswords.js.
var params = {};
if (puzzle) {
params['puzzle_file'] = {
url: puzzle,
type: puzzle.slice(puzzle.lastIndexOf('.') + 1)
};
}
// you can also set parameters in the URL
// as a base64-encoded JSON blob
var b64config = url.searchParams.get("config");
if (b64config) {
var config = JSON.parse(atob(b64config));
params = Object.assign(params, config);
}
// Create the crossword
CrosswordNexus.createCrossword($('div.crossword'), params);
})();
</script>
</body>
</html>