Skip to content

Commit

Permalink
fix js adding iphone/touch class to body
Browse files Browse the repository at this point in the history
  • Loading branch information
ivana committed Oct 15, 2011
1 parent 7d0d0b9 commit 4ad0d9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/javascripts/todo-lists.js.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
supportsTouch = 'createTouch' of document
window.iPhone = supportsTouch and /\b(iPhone|iPod)\b/.test navigator.userAgent

$(document.body).addClass("#{if iPhone then '' else 'no-'}iphone").addClass("#{if supportsTouch then '' else 'no-'}touch")
$ ->
$(document.body).addClass("#{if iPhone then '' else 'no-'}iphone").addClass("#{if supportsTouch then '' else 'no-'}touch")

if window.navigator.standalone
# running as iOS full-screen app; make the Twitter login link ajaxy
Expand Down

0 comments on commit 4ad0d9b

Please sign in to comment.