Get warning on index.html to work.

This commit is contained in:
Kevin Dungs
2014-08-06 18:04:07 +02:00
committed by Tadej Novak
parent 65cf1d0fc8
commit c07fbd43e9
2 changed files with 9 additions and 9 deletions
+5 -4
View File
@@ -24,15 +24,16 @@
<!-- End Google Analytics -->
</head>
<body>
<div id="MobileWarning" class="modal fade bg-warning">
<div class="modal-dialog">
<div id="MobileWarning" class="modal fade">
<div class="modal-dialog bg-warning">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Mobile version</h4>
</div>
<div class="modal-body">
<p>You seem to be using a mobile device. The experience with this website might be very unpleasant for you. This is why we made a mobile version of Particle Clicker.
<p>You seem to be using a mobile device. The experience with this website might be very unpleasant for you. This is why we made a mobile version of Particle Clicker.</p>
<p class="small">Hint: If you use the "Save to home screen" function of your browser, you can even play the game in full screen mode.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Understood, but I want to stay here!</button>
@@ -242,6 +243,6 @@
<script src="js/achievements.js"></script>
<script src="js/ui.js"></script>
<script src="js/game.js"></script>
<script src="js/warnmobile.js></script>
<script src="js/warnmobile.js"></script>
</body>
</html>
+4 -5
View File
@@ -1,8 +1,7 @@
$(function () {
'use strict';
(function() {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
alert('lol');
$('#MobileWarning').modal('show');
} else {
Console.log(navigator.userAgent);
}
});
})();