aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.coffee
diff options
context:
space:
mode:
authorJez Ng2012-09-06 10:43:43 -0400
committerJez Ng2012-09-06 10:43:43 -0400
commite740ea52b646f1b7cd0ef13e15571b20adaa3bd8 (patch)
tree2afcdd5fa50f4b2d33bd46bc173c33fb3c41dc4d /lib/utils.coffee
parente932e28c6ee3376fc3e2c87f07637f123817e0c9 (diff)
downloadvimium-e740ea52b646f1b7cd0ef13e15571b20adaa3bd8.tar.bz2
Touching up.
Diffstat (limited to 'lib/utils.coffee')
-rw-r--r--lib/utils.coffee9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee
index 39279760..a2221ba4 100644
--- a/lib/utils.coffee
+++ b/lib/utils.coffee
@@ -1,7 +1,6 @@
Utils =
getCurrentVersion: ->
- # Chromium #15242 will make this XHR request to access the manifest
- # unnecessary
+ # Chromium #15242 will make this XHR request to access the manifest unnecessary
manifestRequest = new XMLHttpRequest()
manifestRequest.open("GET", chrome.extension.getURL("manifest.json"), false)
manifestRequest.send(null)
@@ -54,8 +53,8 @@ Utils =
# More or less RFC compliant URL host part parsing. This should be sufficient for our needs
urlRegex = new RegExp(
'^(?:([^:]+)(?::([^:]+))?@)?' + # user:password (optional) => \1, \2
- '([^:]+|\\[[^\\]]+\\])' + # host name (IPv6 addresses in square brackets allowed) => \3
- '(?::(\\d+))?$' # port number (optional) => \4
+ '([^:]+|\\[[^\\]]+\\])' + # host name (IPv6 addresses in square brackets allowed) => \3
+ '(?::(\\d+))?$' # port number (optional) => \4
)
# Official ASCII TLDs that are longer than 3 characters + inofficial .onion TLD used by TOR
@@ -92,7 +91,7 @@ Utils =
# Creates a search URL from the given :query.
createSearchUrl: (query) ->
- # Escape explicitely to encode characters like "+" correctly
+ # Escape explicitly to encode characters like "+" correctly
"http://www.google.com/search?q=" + encodeURIComponent(query)
# Converts :string into a Google search if it's not already a URL. We don't bother with escaping characters