Refactored site js

Initially i just wanted to do a check if site.platform was not equal to windows and only then touch the DOM and replace the platform class.
It ended up in a pretty large refactored function where some unnecessary variables and calls was removed.
also added 'use strict'; and linted it.