Add OS detection
Sorry it's javascript, it had to be done.