aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.coffee8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee
index 04f5d909..f089f89d 100644
--- a/lib/utils.coffee
+++ b/lib/utils.coffee
@@ -1,10 +1,8 @@
Utils =
getCurrentVersion: ->
- # 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)
- JSON.parse(manifestRequest.responseText).version
+ chrome.management.get(chrome.i18n.getMessage('@@extension_id'), (info) ->
+ info.version
+ )
# Takes a dot-notation object string and call the function
# that it points to with the correct value for 'this'.