Simplify OS detection code

This commit is contained in:
An Phan 2016-03-13 11:32:37 +08:00
parent 1b81312893
commit 313d9c8fc1

View file

@ -74,11 +74,7 @@
// Add an ugly mac/non-mac class for OS-targeting styles.
// I'm crying inside.
if (navigator.userAgent.indexOf('Mac') !== -1) {
$("html").addClass("mac");
} else {
$("html").addClass("non-mac");
}
$('html').addClass(navigator.userAgent.indexOf('Mac') !== -1 ? 'mac' : 'non-mac');
},
methods: {