Skip to content

Commit

Permalink
fix how.html
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Oct 1, 2015
1 parent fa4ac0c commit d06b9f3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 44 deletions.
15 changes: 15 additions & 0 deletions public/games.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ <h2><a href="http://superhappyfuntimes.net">visit superhappyfuntimes.net for mor
</div>
</div>
</div>
<div class="unhidden-msg" style="display:none;">
<div>
<div>
<p>How To Play</p>
<p>
All players must connect their phones to <span class="strong">
the same WiFi</span> as this computer then go to
<span class="strong">happyfuntimes.net</span>
</p>
<blockquote>
<div class="button-like">Got It!</div>
</blockquote>
</div>
</div>
</div>
<div id="disconnected" class="hft-hidden">
<div class="hft-fullscreencenter">
<div>Disconnected<br/>(please re-start HappyFunTimes)</div>
Expand Down
43 changes: 1 addition & 42 deletions public/how.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,52 +34,11 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
<title>HappyFunTimes</title>
<link rel="stylesheet" href="css/menu.css">
<style>
</style>
</head>
<body>
<div id="hft-icons">
<div class="hft-icon"><a href="how.html"><img src="/hft/assets/question-icon.svg"></a></div>
<div class="hft-icon"><a href="options.html"><img src="/hft/assets/gear-icon.svg"></a></div>
<div class="hft-icon" id="quit"><img src="/hft/assets/power-icon.svg"></div>
</div>
<h1><span id="versionnum"></span><span>HappyFunTimes<span id="version">super-alpha</span></span></h1>
<div class="unhidden-msg" target="games.html">
<div>
<div>
<p>How To Play</p>
<p>
All players must connect their phones to <span class="strong">
the same WiFi</span> as this computer then go to
<span class="strong">happyfuntimes.net</span>
</p>
<blockquote>
<div class="button-like">Got It!</div>
</blockquote>
</div>
</div>
</div>
<div id="disconnected" class="hft-hidden">
<div class="hft-fullscreencenter">
<div>Disconnected<br/>(please re-start HappyFunTimes)</div>
</div>
</div>
<div id="exited" class="hft-hidden">
<div class="hft-fullscreencenter">
<div>Exited<br/>(over and out!)<br/><a href="http://superhappyfuntimes.net">SuperHappyFunTimes</a></div>
</div>
</div>
</body>
<script data-main="scripts/showavailablegames.js" src="3rdparty/require.js"></script>
<script>
requirejs.config({
paths: {
hft: '/hft/0.x.x/scripts',
},
});
window.location.href = "games.html?settings={how:true}";
</script>
</html>

7 changes: 5 additions & 2 deletions public/scripts/showavailablegames.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ requirejs(
gamesById: {},
hftData: {},
};
misc.applyUrlSettings(g);

g.dd = new DragDropManager({
inputElem: document.body,
Expand Down Expand Up @@ -426,9 +427,11 @@ requirejs(

(function() {
var elem = document.querySelector(".unhidden-msg");
if (elem) {
if (elem && g.how) {
window.history.replaceState({}, "", window.location.origin + window.location.pathname);
elem.style.display = "block";
elem.addEventListener('click', function() {
window.location.href = elem.getAttribute("target");
elem.style.display = "none";
}, false);
}
}());
Expand Down

0 comments on commit d06b9f3

Please sign in to comment.