From 595e70c8c5f642290a446e845de77e539bc6d9b9 Mon Sep 17 00:00:00 2001 From: Song Gao Date: Mon, 25 Mar 2013 19:00:07 -0700 Subject: [PATCH] Create gh-pages branch via GitHub --- index.html | 25 ++- javascripts/scale.fix.js | 37 ++-- stylesheets/styles.css | 414 ++++++++++++--------------------------- 3 files changed, 157 insertions(+), 319 deletions(-) diff --git a/index.html b/index.html index c2712e5..0d1cab8 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,6 @@ - - + + \ No newline at end of file diff --git a/javascripts/scale.fix.js b/javascripts/scale.fix.js index 08716c0..87a40ca 100644 --- a/javascripts/scale.fix.js +++ b/javascripts/scale.fix.js @@ -1,20 +1,17 @@ -fixScale = function(doc) { - - var addEvent = 'addEventListener', - type = 'gesturestart', - qsa = 'querySelectorAll', - scales = [1, 1], - meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; - - function fix() { - meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; - doc.removeEventListener(type, fix, true); - } - - if ((meta = meta[meta.length - 1]) && addEvent in doc) { - fix(); - scales = [.25, 1.6]; - doc[addEvent](type, fix, true); - } - -}; \ No newline at end of file +var metas = document.getElementsByTagName('meta'); +var i; +if (navigator.userAgent.match(/iPhone/i)) { + for (i=0; i