Skip to content

Instantly share code, notes, and snippets.

@Hengjie
Last active December 30, 2015 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hengjie/7833364 to your computer and use it in GitHub Desktop.
Save Hengjie/7833364 to your computer and use it in GitHub Desktop.
Get Google Chrome Extension's version
getVersion = ->
xhr = new XMLHttpRequest()
xhr.open "GET", chrome.extension.getURL("manifest.json"), false
xhr.send null
manifest = JSON.parse(xhr.responseText)
manifest.version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment