Skip to content

Commit d06b9f3

Browse files
committed
fix how.html
1 parent fa4ac0c commit d06b9f3

File tree

3 files changed

+21
-44
lines changed

3 files changed

+21
-44
lines changed

public/games.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,21 @@ <h2><a href="http://superhappyfuntimes.net">visit superhappyfuntimes.net for mor
9797
</div>
9898
</div>
9999
</div>
100+
<div class="unhidden-msg" style="display:none;">
101+
<div>
102+
<div>
103+
<p>How To Play</p>
104+
<p>
105+
All players must connect their phones to <span class="strong">
106+
the same WiFi</span> as this computer then go to
107+
<span class="strong">happyfuntimes.net</span>
108+
</p>
109+
<blockquote>
110+
<div class="button-like">Got It!</div>
111+
</blockquote>
112+
</div>
113+
</div>
114+
</div>
100115
<div id="disconnected" class="hft-hidden">
101116
<div class="hft-fullscreencenter">
102117
<div>Disconnected<br/>(please re-start HappyFunTimes)</div>

public/how.html

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -34,52 +34,11 @@
3434
<html>
3535
<head>
3636
<meta charset="utf-8">
37-
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
3837
<title>HappyFunTimes</title>
39-
<link rel="stylesheet" href="css/menu.css">
40-
<style>
41-
</style>
4238
</head>
4339
<body>
44-
<div id="hft-icons">
45-
<div class="hft-icon"><a href="how.html"><img src="/hft/assets/question-icon.svg"></a></div>
46-
<div class="hft-icon"><a href="options.html"><img src="/hft/assets/gear-icon.svg"></a></div>
47-
<div class="hft-icon" id="quit"><img src="/hft/assets/power-icon.svg"></div>
48-
</div>
49-
<h1><span id="versionnum"></span><span>HappyFunTimes<span id="version">super-alpha</span></span></h1>
50-
<div class="unhidden-msg" target="games.html">
51-
<div>
52-
<div>
53-
<p>How To Play</p>
54-
<p>
55-
All players must connect their phones to <span class="strong">
56-
the same WiFi</span> as this computer then go to
57-
<span class="strong">happyfuntimes.net</span>
58-
</p>
59-
<blockquote>
60-
<div class="button-like">Got It!</div>
61-
</blockquote>
62-
</div>
63-
</div>
64-
</div>
65-
<div id="disconnected" class="hft-hidden">
66-
<div class="hft-fullscreencenter">
67-
<div>Disconnected<br/>(please re-start HappyFunTimes)</div>
68-
</div>
69-
</div>
70-
<div id="exited" class="hft-hidden">
71-
<div class="hft-fullscreencenter">
72-
<div>Exited<br/>(over and out!)<br/><a href="http://superhappyfuntimes.net">SuperHappyFunTimes</a></div>
73-
</div>
74-
</div>
75-
</body>
76-
<script data-main="scripts/showavailablegames.js" src="3rdparty/require.js"></script>
7740
<script>
78-
requirejs.config({
79-
paths: {
80-
hft: '/hft/0.x.x/scripts',
81-
},
82-
});
41+
window.location.href = "games.html?settings={how:true}";
8342
</script>
8443
</html>
8544

public/scripts/showavailablegames.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ requirejs(
5555
gamesById: {},
5656
hftData: {},
5757
};
58+
misc.applyUrlSettings(g);
5859

5960
g.dd = new DragDropManager({
6061
inputElem: document.body,
@@ -426,9 +427,11 @@ requirejs(
426427

427428
(function() {
428429
var elem = document.querySelector(".unhidden-msg");
429-
if (elem) {
430+
if (elem && g.how) {
431+
window.history.replaceState({}, "", window.location.origin + window.location.pathname);
432+
elem.style.display = "block";
430433
elem.addEventListener('click', function() {
431-
window.location.href = elem.getAttribute("target");
434+
elem.style.display = "none";
432435
}, false);
433436
}
434437
}());

0 commit comments

Comments
 (0)