Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added Canary as a browser

commit 0d23f3e10650ec8e3792cd7a7f0ceaec2ae84fcb 1 parent 4481768
@JGailor JGailor authored
Showing with 27 additions and 1 deletion.
  1. +1 −1  Side Bar.sublime-settings
  2. +26 −0 SideBar.py
View
2  Side Bar.sublime-settings
@@ -24,7 +24,7 @@
"disabled_menuitem_empty": true,
//if installed in a default location maybe this works.
- "default_browser": "", //one of this list: firefox, chrome, chromium, opera, safari
+ "default_browser": "", //one of this list: firefox, chrome, canary, chromium, opera, safari
"portable_browser": "", // for example: C:/Program Files (x86)/Nightly/firefox.exe
View
26 SideBar.py
@@ -1348,6 +1348,32 @@ def try_open(self, url, browser):
])
commands = ['-new-tab', url]
+ elif browser == 'canary':
+ if sublime.platform() == 'osx':
+ items.extend(['open'])
+ commands = ['-a', '/Applications/Google Chrome Canary.app', url]
+ elif sublime.platform() == 'windows':
+ # read local app data path from registry
+ aKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders")
+ reg_value, reg_type = winreg.QueryValueEx (aKey, "Local AppData")
+
+ if s.get('portable_browser') != '':
+ items.extend([s.get('portable_browser')])
+ items.extend([
+ '%HOMEPATH%\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe'
+
+ ,reg_value+'\\Chrome SxS\\Application\\chrome.exe'
+ ,reg_value+'\\Google\\Chrome SxS\\Application\\chrome.exe'
+ ,'%HOMEPATH%\\Google\\Chrome SxS\\Application\\chrome.exe'
+ ,'%PROGRAMFILES%\\Google\\Chrome SxS\\Application\\chrome.exe'
+ ,'%PROGRAMFILES(X86)%\\Google\\Chrome SxS\\Application\\chrome.exe'
+ ,'%USERPROFILE%\\Local\ Settings\\Application\ Data\\Google\\Chrome SxS\\chrome.exe'
+ ,'%HOMEPATH%\\Local\ Settings\\Application\ Data\\Google\\Chrome SxS\\Application\\chrome.exe'
+ ,'%HOMEPATH%\\Local Settings\\Application Data\\Google\\Chrome SxS\\Application\\chrome.exe'
+ ])
+
+ commands = ['-new-tab', url]
+
elif browser == 'chromium':
if sublime.platform() == 'osx':
items.extend(['open'])
Please sign in to comment.
Something went wrong with that request. Please try again.