Skip to content

Instantly share code, notes, and snippets.

View shawndeprey's full-sized avatar
💭
If you stop learning, you stop living.

Shawn Deprey shawndeprey

💭
If you stop learning, you stop living.
View GitHub Profile
@handleman
handleman / detectmac.js
Created October 14, 2014 15:01
Best way to detect Mac OS X or Windows computers with JavaScript or jQuery
var isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0;
var isMacLike = navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i)?true:false;
var isIOS = navigator.platform.match(/(iPhone|iPod|iPad)/i)?true:false;