-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make captive portal work again for iOS11
- Loading branch information
Showing
12 changed files
with
199 additions
and
9 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
Assets/HappyFunTimes/HappyFunTimesCore/Server/HFTBrowserVersion.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using System.Text.RegularExpressions; | ||
|
||
namespace HappyFunTimes { | ||
public class HFTBrowserVersion { | ||
static public bool IsIOS(string userAgent) | ||
{ | ||
return m_iosRE.IsMatch(userAgent); | ||
} | ||
|
||
public class Version { | ||
public Version(int major = 0, int minor = 0) | ||
{ | ||
Major = major; | ||
Minor = minor; | ||
} | ||
public int Major = 0; | ||
public int Minor = 0; | ||
}; | ||
|
||
static public Version IOSVersion(string userAgent) | ||
{ | ||
var m = m_versionRE.Match(userAgent); | ||
if (m.Success) | ||
{ | ||
return new Version( | ||
Int32.Parse(m.Groups[1].ToString()), | ||
Int32.Parse(m.Groups[2].ToString())); | ||
} | ||
return new Version(); | ||
} | ||
|
||
static public bool IsIOS10(string userAgent) | ||
{ | ||
return IsIOS(userAgent) && IOSVersion(userAgent).Major == 10; | ||
} | ||
|
||
static private Regex m_iosRE = new Regex("iPad|iPhone"); | ||
static private Regex m_versionRE = new Regex("OS (\\d+)_(\\d+)\\D"); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Assets/HappyFunTimes/HappyFunTimesCore/Server/HFTBrowserVersion.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/HappyFunTimes/Resources/HappyFunTimesAutoGeneratedDoNotEdit/__dir__.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
["icon-16.png","3rdparty/audiomanager-min.js","3rdparty/audiomanager.js","3rdparty/chroma.min.js","3rdparty/game-utils-min.js","3rdparty/game-utils.js","3rdparty/gyronorm.complete.min.js","controllers/camera/controller.html","controllers/camera/css/controller.css","controllers/camera/scripts/controller.js","controllers/character-select/controller.html","controllers/character-select/css/controller.css","controllers/character-select/images/cube.svg","controllers/character-select/images/cylinder.svg","controllers/character-select/images/sphere.svg","controllers/character-select/scripts/controller.js","controllers/clean/controller.html","controllers/gamepad/controller.html","controllers/gamepad/css/controller.css","controllers/gamepad/images/bird.png","controllers/gamepad/images/hft-circle-button.svg","controllers/gamepad/images/hft-down-arrow-button.svg","controllers/gamepad/images/hft-left-arrow-button.svg","controllers/gamepad/images/hft-right-arrow-button.svg","controllers/gamepad/images/hft-up-arrow-button.svg","controllers/gamepad/scripts/controller.js","controllers/gamepad/sounds/explosion.mp3","controllers/gamepad/sounds/gameover.mp3","controllers/gamepad/sounds/launch.mp3","controllers/gamepad/sounds/sounds.jsfx.txt","controllers/multi-machine/controller.html","controllers/multi-machine/css/controller.css","controllers/multi-machine/images/bird.png","controllers/multi-machine/images/hft-circle-button.svg","controllers/multi-machine/images/hft-down-arrow-button.svg","controllers/multi-machine/images/hft-left-arrow-button.svg","controllers/multi-machine/images/hft-right-arrow-button.svg","controllers/multi-machine/images/hft-up-arrow-button.svg","controllers/multi-machine/scripts/controller.js","controllers/simple/controller.html","controllers/simple/css/controller.css","controllers/simple/scripts/controller.js","controllers/syncedclock/controller.html","controllers/syncedclock/assets/clocktick.mp3","controllers/syncedclock/assets/clocktick.ogg","controllers/syncedclock/css/controller.css","controllers/syncedclock/scripts/controller.js","hft/hft-min.js","hft/hft.js","hft/missing.html","hft/assets/gear-icon.svg","hft/captive-portal/captive-portal.html","hft/captive-portal/game-login.html","hft/captive-portal/login.css","hft/captive-portal/xtra2.bin","sample-ui/sample-ui-min.js","sample-ui/sample-ui.css","sample-ui/sample-ui.js"] | ||
["icon-16.png","3rdparty/audiomanager-min.js","3rdparty/audiomanager.js","3rdparty/chroma.min.js","3rdparty/game-utils-min.js","3rdparty/game-utils.js","3rdparty/gyronorm.complete.min.js","controllers/camera/controller.html","controllers/camera/css/controller.css","controllers/camera/scripts/controller.js","controllers/character-select/controller.html","controllers/character-select/css/controller.css","controllers/character-select/images/cube.svg","controllers/character-select/images/cylinder.svg","controllers/character-select/images/sphere.svg","controllers/character-select/scripts/controller.js","controllers/clean/controller.html","controllers/gamepad/controller.html","controllers/gamepad/css/controller.css","controllers/gamepad/images/bird.png","controllers/gamepad/images/hft-circle-button.svg","controllers/gamepad/images/hft-down-arrow-button.svg","controllers/gamepad/images/hft-left-arrow-button.svg","controllers/gamepad/images/hft-right-arrow-button.svg","controllers/gamepad/images/hft-up-arrow-button.svg","controllers/gamepad/scripts/controller.js","controllers/gamepad/sounds/explosion.mp3","controllers/gamepad/sounds/gameover.mp3","controllers/gamepad/sounds/launch.mp3","controllers/gamepad/sounds/sounds.jsfx.txt","controllers/multi-machine/controller.html","controllers/multi-machine/css/controller.css","controllers/multi-machine/images/bird.png","controllers/multi-machine/images/hft-circle-button.svg","controllers/multi-machine/images/hft-down-arrow-button.svg","controllers/multi-machine/images/hft-left-arrow-button.svg","controllers/multi-machine/images/hft-right-arrow-button.svg","controllers/multi-machine/images/hft-up-arrow-button.svg","controllers/multi-machine/scripts/controller.js","controllers/simple/controller.html","controllers/simple/css/controller.css","controllers/simple/scripts/controller.js","controllers/syncedclock/controller.html","controllers/syncedclock/assets/clocktick.mp3","controllers/syncedclock/assets/clocktick.ogg","controllers/syncedclock/css/controller.css","controllers/syncedclock/scripts/controller.js","hft/hft-min.js","hft/hft.js","hft/missing.html","hft/assets/gear-icon.svg","hft/captive-portal/captive-portal.html","hft/captive-portal/game-login-manual.html","hft/captive-portal/game-login.html","hft/captive-portal/login.css","hft/captive-portal/xtra2.bin","sample-ui/sample-ui-min.js","sample-ui/sample-ui.css","sample-ui/sample-ui.js"] |
59 changes: 59 additions & 0 deletions
59
...urces/HappyFunTimesAutoGeneratedDoNotEdit/hft/captive-portal/game-login-manual.html.bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!-- | ||
/* | ||
* Copyright 2014, Gregg Tavares. | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are | ||
* met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above | ||
* copyright notice, this list of conditions and the following disclaimer | ||
* in the documentation and/or other materials provided with the | ||
* distribution. | ||
* * Neither the name of Gregg Tavares. nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | ||
|
||
<meta name="HandheldFriendly" content="True"> | ||
<meta name="MobileOptimized" content="320"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui"> | ||
<meta name="format-detection" content="telephone=no" /> | ||
<title>HappyFunTimes Redirect</title> | ||
<link rel="stylesheet" href="/hft/captive-portal/login.css"> | ||
<style> | ||
</style> | ||
</head> | ||
<body> | ||
<div class="hft-center hft-fullsize"> | ||
<h1>HappyFunTimes</h1> | ||
<h1>Please open your browser and go to hft.com</h1> | ||
<!-- iOS 10.3 broke this functionality. Rumor is it might be fixed in iOS 11 | ||
<a id="start" href="%(startUrl)s" target="_blank">Start</a> --> | ||
</div> | ||
</body> | ||
</html> | ||
|
||
|
9 changes: 9 additions & 0 deletions
9
.../HappyFunTimesAutoGeneratedDoNotEdit/hft/captive-portal/game-login-manual.html.bytes.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
Assets/WebPlayerTemplates/HappyFunTimes/hft/captive-portal/game-login-manual.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!-- | ||
/* | ||
* Copyright 2014, Gregg Tavares. | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are | ||
* met: | ||
* | ||
* * Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* * Redistributions in binary form must reproduce the above | ||
* copyright notice, this list of conditions and the following disclaimer | ||
* in the documentation and/or other materials provided with the | ||
* distribution. | ||
* * Neither the name of Gregg Tavares. nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | ||
|
||
<meta name="HandheldFriendly" content="True"> | ||
<meta name="MobileOptimized" content="320"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui"> | ||
<meta name="format-detection" content="telephone=no" /> | ||
<title>HappyFunTimes Redirect</title> | ||
<link rel="stylesheet" href="/hft/captive-portal/login.css"> | ||
<style> | ||
</style> | ||
</head> | ||
<body> | ||
<div class="hft-center hft-fullsize"> | ||
<h1>HappyFunTimes</h1> | ||
<h1>Please open your browser and go to hft.com</h1> | ||
<!-- iOS 10.3 broke this functionality. Rumor is it might be fixed in iOS 11 | ||
<a id="start" href="%(startUrl)s" target="_blank">Start</a> --> | ||
</div> | ||
</body> | ||
</html> | ||
|
||
|
9 changes: 9 additions & 0 deletions
9
Assets/WebPlayerTemplates/HappyFunTimes/hft/captive-portal/game-login-manual.html.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters