Permalink
Browse files

Icon and title

  • Loading branch information...
1 parent 1dfabf3 commit a7caf3bd140e87c521fc92b0810fdce42599f394 @tadast committed Apr 11, 2012
Showing with 32 additions and 37 deletions.
  1. +1 −1 css/style.css
  2. BIN images/icon.png
  3. BIN images/icon.psd
  4. +2 −0 index.html
  5. +13 −14 scripts/main.coffee
  6. +16 −22 scripts/main.js
View
@@ -58,4 +58,4 @@ canvas{
#sorry{
text-align: center;
padding-top: 20%;
-}
+}
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -1,5 +1,6 @@
<!doctype html>
<head>
+ <title>Canver</title>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
@@ -9,6 +10,7 @@
<script type="text/javascript" src="scripts/objects/canver.js"></script>
<script type="text/javascript" src="scripts/main.js"></script>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/>
+ <link rel="apple-touch-icon" href="images/icon.png"/>
</head>
<body>
<div id='menu'></div>
View
@@ -1,17 +1,16 @@
+unless "ontouchend" of document
+ window.location = 'unsupported.html'
+
window.onload = ->
- if !("ontouchstart" in document.documentElement)
- window.location = 'unsupported.html'
- else
- canvas = document.getElementById('canvas');
- bgSetup = document.getElementById('backgroundSetup');
- menu = document.getElementById('menu');
+ canvas = document.getElementById 'canvas'
+ bgSetup = document.getElementById 'backgroundSetup'
+ menu = document.getElementById 'menu'
- unless window.navigator.standalone
- alert 'Add this app to your Home Screen for better experience.'
+ unless window.navigator.standalone
+ alert 'Add this app to your Home Screen for better experience.'
- bgSetup.addEventListener "touchstart", (e) =>
- colorClicked = e.target.dataset.color
- bgSetup.style.display = 'none'
- canvas.style.display = 'block'
- @canver = new Canver canvas, menu, colorClicked
-
+ bgSetup.addEventListener "touchstart", (e) =>
+ colorClicked = e.target.dataset.color
+ bgSetup.style.display = 'none'
+ canvas.style.display = 'block'
+ @canver = new Canver canvas, menu, colorClicked
View
@@ -1,26 +1,20 @@
-var __indexOf = Array.prototype.indexOf || function(item) {
- for (var i = 0, l = this.length; i < l; i++) {
- if (this[i] === item) return i;
- }
- return -1;
-}, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+if (!("ontouchend" in document)) {
+ window.location = 'unsupported.html';
+}
window.onload = function() {
var bgSetup, canvas, menu;
- if (!(__indexOf.call(document.documentElement, "ontouchstart") >= 0)) {
- return window.location = 'unsupported.html';
- } else {
- canvas = document.getElementById('canvas');
- bgSetup = document.getElementById('backgroundSetup');
- menu = document.getElementById('menu');
- if (!window.navigator.standalone) {
- alert('Add this app to your Home Screen for better experience.');
- }
- return bgSetup.addEventListener("touchstart", __bind(function(e) {
- var colorClicked;
- colorClicked = e.target.dataset.color;
- bgSetup.style.display = 'none';
- canvas.style.display = 'block';
- return this.canver = new Canver(canvas, menu, colorClicked);
- }, this));
+ canvas = document.getElementById('canvas');
+ bgSetup = document.getElementById('backgroundSetup');
+ menu = document.getElementById('menu');
+ if (!window.navigator.standalone) {
+ alert('Add this app to your Home Screen for better experience.');
}
+ return bgSetup.addEventListener("touchstart", __bind(function(e) {
+ var colorClicked;
+ colorClicked = e.target.dataset.color;
+ bgSetup.style.display = 'none';
+ canvas.style.display = 'block';
+ return this.canver = new Canver(canvas, menu, colorClicked);
+ }, this));
};

0 comments on commit a7caf3b

Please sign in to comment.