aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.coffee')
-rw-r--r--lib/utils.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee
index 45a880e5..f44e0cbb 100644
--- a/lib/utils.coffee
+++ b/lib/utils.coffee
@@ -131,7 +131,7 @@ Utils =
# It would be better to pull the default search engine from chrome itself. However, chrome does not provide
# an API for doing so.
createSearchUrl: (query, searchUrl = Settings.get("searchUrl")) ->
- searchUrl += "%s" if -1 == searchUrl.indexOf("%s") + searchUrl.indexOf("%S")
+ searchUrl += "%s" unless ['%s', '%S'].some (token) -> searchUrl.indexOf(token) >= 0
searchUrl = searchUrl.replace /%S/g, query
searchUrl.replace /%s/g, @createSearchQuery query