Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/browser-plus-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class BrowserPlusView extends View
else
localhostPattern = ///^
(http://)?
localhost
([a-zA-Z0-9]*)
///i
if url.search(localhostPattern) < 0 and url.indexOf('.') < 0
url = "http://www.google.com/search?as_q=#{url}"
Expand All @@ -337,8 +337,8 @@ class BrowserPlusView extends View
url = url.replace(/\\/g,"/")
else
url = URL.format(urls)
else if url.indexOf('localhost') isnt -1
url = url.replace(localhostPattern,'http://127.0.0.1')
#else if url.indexOf('localhost') isnt -1
# url = url.replace(localhostPattern,'http://127.0.0.1')
else
urls.protocol = 'http'
url = URL.format(urls)
Expand Down
4 changes: 2 additions & 2 deletions lib/browser-plus.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = BrowserPlus =
url.indexOf('browser-plus~') is 0 )
localhostPattern = ///^
(http://)?
localhost
([a-zA-Z0-9]*)
///i
return false unless BrowserPlusModel.checkUrl(url)
# check if it need to be open in same window
Expand All @@ -61,7 +61,7 @@ module.exports = BrowserPlus =
pane.activateItem(editor)
return editor

url = url.replace(localhostPattern,'http://127.0.0.1')
#url = url.replace(localhostPattern,'http://127.0.0.1')
new BrowserPlusModel {browserPlus:@,url:url,opt:opt}

# Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable
Expand Down