Fixed chrome webapp home page stuff
This commit is contained in:
parent
2c6a818f65
commit
e438dc8477
25
cat.html
25
cat.html
|
@ -8,20 +8,24 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF8">
|
<meta http-equiv="content-type" content="text/html; charset=UTF8">
|
||||||
|
|
||||||
<!-- Viewport isn't scalable -->
|
<!-- Viewport isn't scalable -->
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1, user-scalable=0, minimal-au" />
|
<!-- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1, user-scalable=0, minimal-ui" /> -->
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimal-ui" />
|
||||||
<!-- <meta name="viewport" content="width=device-width, minimal-ui" /> -->
|
<!-- <meta name="viewport" content="width=device-width, minimal-ui" /> -->
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
|
|
||||||
|
<title>Cat Parade</title>
|
||||||
<!-- for apps on home screen -->
|
<!-- for apps on home screen -->
|
||||||
|
|
||||||
<!-- for ios 7 style, multi-resolution icon of 152x152 -->
|
<!-- for ios 7 style, multi-resolution icon of 152x152 -->
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-barstyle" content="black-translucent">
|
<meta name="apple-mobile-web-app-status-barstyle" content="black-translucent">
|
||||||
<link rel="apple-touch-icon" href="images/icon-152.png">
|
<link rel="apple-touch-icon" href="images/icon-152.png">
|
||||||
<!-- for Chrome on Android, multi-resolution icon of 196x196 -->
|
|
||||||
|
<!-- for Chrome on Android, multi-resolution icon of 192x192 -->
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<link rel="shortcut icon" sizes="196x196" href="images/icon-196.png">
|
<link rel="manifest" href="manifest.json">
|
||||||
|
<link rel="icon" sizes="192x192" href="images/icon-192.png">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
canvas {
|
canvas {
|
||||||
|
@ -971,6 +975,19 @@ var game = {
|
||||||
this.screenflash = 1.0;
|
this.screenflash = 1.0;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
fullscreen : function(i) {
|
||||||
|
// go full-screen
|
||||||
|
if (i.requestFullscreen) {
|
||||||
|
i.requestFullscreen();
|
||||||
|
} else if (i.webkitRequestFullscreen) {
|
||||||
|
i.webkitRequestFullscreen();
|
||||||
|
} else if (i.mozRequestFullScreen) {
|
||||||
|
i.mozRequestFullScreen();
|
||||||
|
} else if (i.msRequestFullscreen) {
|
||||||
|
i.msRequestFullscreen();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
init : function() {
|
init : function() {
|
||||||
|
|
||||||
this.canvas = document.createElement("canvas");
|
this.canvas = document.createElement("canvas");
|
||||||
|
@ -986,6 +1003,8 @@ var game = {
|
||||||
|
|
||||||
ctx = this.context;
|
ctx = this.context;
|
||||||
|
|
||||||
|
//this.fullscreen(this.canvas);
|
||||||
|
|
||||||
// find ipad/android/iphone so we can hide the address bar
|
// find ipad/android/iphone so we can hide the address bar
|
||||||
this.ua = navigator.userAgent.toLowerCase();
|
this.ua = navigator.userAgent.toLowerCase();
|
||||||
this.android = this.ua.indexOf('android') > -1 ? true : false;
|
this.android = this.ua.indexOf('android') > -1 ? true : false;
|
||||||
|
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"name": "Cat Parade manifest",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "images/icon-192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png",
|
||||||
|
"density": 4.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": "cat.html",
|
||||||
|
"display": "standalone",
|
||||||
|
"orientation": "portrait"
|
||||||
|
}
|
Loading…
Reference in New Issue