Unified · Split
| @@ -2,7 +2,7 @@ class app.Shortcuts · 1 unmodified line | |||
| 2 | $.extend @prototype, Events | 2 | $.extend @prototype, Events |
| 3 | 3 | ||
| 4 | constructor: -> | 4 | constructor: -> |
| 5 | @isWindows = navigator.platform?.indexOf('Win') >= 0 | 5 | @isWindows = $.isWindows() |
| 6 | @start() | 6 | @start() |
| 7 | 7 | ||
| 8 | start: -> | 8 | start: -> |
| @@ -277,6 +277,12 @@ $.popup = (value) -> · 276 unmodified lines | |||
| 277 | $.isTouchScreen = -> | 277 | $.isTouchScreen = -> |
| 278 | typeof ontouchstart isnt 'undefined' | 278 | typeof ontouchstart isnt 'undefined' |
| 279 | 279 | ||
| 280 | $.isWindows = -> | ||
| 281 | navigator.platform?.indexOf('Win') >= 0 | ||
| 282 | |||
| 283 | $.isMac = -> | ||
| 284 | navigator.userAgent?.indexOf('Mac') >= 0 | ||
| 285 | |||
| 280 | HIGHLIGHT_DEFAULTS = | 286 | HIGHLIGHT_DEFAULTS = |
| 281 | className: 'highlight' | 287 | className: 'highlight' |
| 282 | delay: 1000 | 288 | delay: 1000 |
| @@ -1,5 +1,5 @@ | |||
| 1 | ctrlKey = if navigator.userAgent?.indexOf('Mac') >= 0 then 'cmd' else 'ctrl' | 1 | ctrlKey = if $.isMac() then 'cmd' else 'ctrl' |
| 2 | navKey = if navigator.platform?.indexOf('Win') >= 0 then 'alt' else ctrlKey | 2 | navKey = if $.isWindows() then 'alt' else ctrlKey |
| 3 | 3 | ||
| 4 | app.templates.helpPage = """ | 4 | app.templates.helpPage = """ |
| 5 | <div class="_toc"> | 5 | <div class="_toc"> |