Skip to content

Instantly share code, notes, and snippets.

@Hengjie
Last active December 30, 2015 13:08
Show Gist options
  • 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