aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsainaen2013-05-09 00:22:08 +0300
committersainaen2013-05-09 00:26:46 +0300
commit4f86d30f4a0435d05d995e345508dca66c7a68da (patch)
tree176e3c31152120a52525f2c5a452c47cbef1a566
parent6c87a84ec01a8a9f879bafafa5e7f12a2f4aaadb (diff)
downloadvimium-4f86d30f4a0435d05d995e345508dca66c7a68da.tar.bz2
Fix utils.getCurrentVersion()
The code of this function before patch doesn't work for two reasons: 1) it makes async call, so it actually returns `undefined` 2) you need appropriate permission to call chrome.management.get() in manifest
-rw-r--r--lib/utils.coffee4
1 files changed, 1 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'.