Change indexOf string matching calls to use regex

This commit is contained in:
probablycorey
2013-05-23 10:31:07 -07:00
parent c0149100bb
commit 61d9f957ea

View File

@@ -35,7 +35,7 @@ class WindowEventHandler
return unless location
return if location[0] is '#'
if location.indexOf('https://') is 0 or location.indexOf('http://') is 0
if /^https?:\/\//.test(location)
require('shell').openExternal location
false