Skip to content

Instantly share code, notes, and snippets.

@kentbrew
Last active November 18, 2016 00:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentbrew/8f65d3bd88c1333b0e8f79ceeec932eb to your computer and use it in GitHub Desktop.
Save kentbrew/8f65d3bd88c1333b0e8f79ceeec932eb to your computer and use it in GitHub Desktop.
How to tell if your Chrome browser extension has WebExtensions support
From the root directory of your Chrome extension:
grep -r " chrome\." . | sed s/.*chrome\./\"/g | sed s/\(.*/#Browser_compatibility/ | sed s/[.]/\\//g | sed s/./https:\\/\\/developer\.mozilla\.org\\/Add-ons\\/WebExtensions\\/API\\// | sort | uniq
Hopefully you'll get something like this:
https://developer.mozilla.org/Add-ons/WebExtensions/API/i18n/getMessage#Browser_compatibility
https://developer.mozilla.org/Add-ons/WebExtensions/API/runtime/sendMessage#Browser_compatibility
https://developer.mozilla.org/Add-ons/WebExtensions/API/storage/local/get#Browser_compatibility
https://developer.mozilla.org/Add-ons/WebExtensions/API/storage/local/set#Browser_compatibility
Go, read, learn, love.
@kentbrew
Copy link
Author

My command-fu is pretty grim; if there's a simpler way to do this, pull requests will be gratefully merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment