Fix various JSHint issues.
Use `common.platform` everywhere.
Remove trailing spaces.
Use the shorter `js` to highlight Javascript code.