adampresley/sublime-view-in-browser — pull request #12 by schlick (2013-03-07 13:31:23+00:00)
Title: Support Chrome on Mac

Installed your plugin tonight and fiddled around to make it work with Chrome on the Mac. Added it in as a user setting but I kept getting the following error:

```
OS name: posix, Platform: linux.*
OS name: nt, Platform: win32
Traceback (most recent call last):
File "./sublime_plugin.py", line 362, in run_
File "./ViewInBrowserCommand.py", line 41, in run
File "./ViewInBrowserCommand.py", line 112, in _loadSettings
File "./ViewInBrowserCommand.py", line 133, in getUserShellFolders
ImportError: No module named _winreg
```

When I removed the other chrome options, my setting would work. It appears that the problem is that in _loadSettings, getUserShellFolders is being called whenever these is an NT option in the settings for that particular browser. So, when on a Mac, _winreg gets called and fails.

My patch moves this call to getUserShellFolders to inside the main conditional that matches the OS and platform so that it only gets called when you are on a Windows OS.

I've also added my addition of Chrome on Mac to the supported browsers sublime settings. This is a separate commit so you can choose to include it or not.

Since, I'm on a Mac system, I haven't been able to verify whether my change breaks anything on a Windows or Linux system. Nor have I tried the View on Local Server option either.