aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Crosby2013-05-08 14:45:01 -0700
committerPhil Crosby2013-05-08 14:45:01 -0700
commit30533d7a7c3ef02a27205976da935c4ff68e3d5d (patch)
tree55eb0c0cf542eaa72451f3716a1e7bb194588265
parent6c87a84ec01a8a9f879bafafa5e7f12a2f4aaadb (diff)
parent453d35f24b77fc92c7aaf61f625878ea9848e9c6 (diff)
downloadvimium-30533d7a7c3ef02a27205976da935c4ff68e3d5d.tar.bz2
Merge pull request #831 from sainaen/fix_get_version
Fix utils.getCurrentVersion()
-rw-r--r--lib/utils.coffee4
-rw-r--r--tests/dom_tests/chrome.coffee3
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee
index f089f89d..8d588a43 100644
--- a/lib/utils.coffee
+++ b/lib/utils.coffee
@@ -1,8 +1,6 @@
Utils =
getCurrentVersion: ->
- chrome.management.get(chrome.i18n.getMessage('@@extension_id'), (info) ->
- info.version
- )
+ chrome.runtime.getManifest().version
# Takes a dot-notation object string and call the function
# that it points to with the correct value for 'this'.
diff --git a/tests/dom_tests/chrome.coffee b/tests/dom_tests/chrome.coffee
index c8ec9d29..71d0c572 100644
--- a/tests/dom_tests/chrome.coffee
+++ b/tests/dom_tests/chrome.coffee
@@ -17,4 +17,7 @@ root.chrome = {
}
sendMessage: ->
}
+ runtime: {
+ getManifest: ->
+ }
}