aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormrmr19932017-08-17 19:49:07 +0100
committermrmr19932017-09-12 11:42:18 +0100
commit4d148a48ec375db2dc86f09f274bf5c3f76cce39 (patch)
treee0c706fba36602383ff4805b199bf50c3f3354d6 /lib
parentf3b186c0228f68e15e6c8d2aad53c227efb187f4 (diff)
downloadvimium-4d148a48ec375db2dc86f09f274bf5c3f76cce39.tar.bz2
Add Utils.isFirefox
This also stops the content scripts from being injected into each frame on reload (in Firefox only). They do not successfully connect to the background page, and it causes considerable lag, so we lose nothing by doing this.
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.coffee1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee
index 78eed12c..520d5b8c 100644
--- a/lib/utils.coffee
+++ b/lib/utils.coffee
@@ -7,6 +7,7 @@ window.forTrusted ?= (handler) -> (event) ->
true
Utils =
+ isFirefox: -> 0 <= navigator.userAgent.indexOf "Firefox"
getCurrentVersion: ->
chrome.runtime.getManifest().version