Skip to content

Commit

Permalink
Use different mobile test
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell committed Mar 31, 2015
1 parent aa2a6b9 commit 66353f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion h/static/scripts/annotator/guest.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = class Guest extends Annotator
"document onselectionchange": "userSelectionChanged"

# We bind different events depending on whether the browser supports touch.
mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
mobile = 'ontouchstart' in window or window.DocumentTouch and document instanceof DocumentTouch
if mobile
# This hack is needed for iOS Safari.
$(window).bind 'selectionEnd', ->
Expand Down
2 changes: 1 addition & 1 deletion h/static/scripts/annotator/plugin/toolbar.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ makeButton = (item) ->
class Annotator.Plugin.Toolbar extends Annotator.Plugin
PUSHED_CLASS = 'annotator-pushed'

mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
mobile = 'ontouchstart' in window or window.DocumentTouch and document instanceof DocumentTouch

events:
'.annotator-toolbar mouseenter': 'show'
Expand Down
3 changes: 1 addition & 2 deletions h/templates/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
<html prefix="og: http://ogp.me/ns#">
<head>
{% block meta %}
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
{% for attrs in meta_attrs -%}
<meta {% for key, value in attrs.items() %}{{ key }}="{{ value }}" {% endfor %}/>
{% endfor -%}
Expand Down

0 comments on commit 66353f4

Please sign in to comment.