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