I'd like to support multiple GNOME versions with my shell extension. How can I detect the GNOME version it's running on and branch the code appropriately?
Asked
Active
Viewed 665 times
5
-
By any chance you have been succesfull in setting an IDE to autocomplete Gjs? – Eefret Feb 03 '16 at 16:59
-
No. I'm not generally familiar with JS autocompletion, but I did have an idea to make TypeScript/Flow annotations for Gnome Shell. That would probably be a big job though, and with Gnome Shell's versioning hell, DefinitelyTyped's infrastructure probably wouldn't work great. – Leif Arne Storset Feb 03 '16 at 17:26
1 Answers
5
const Config = imports.misc.config;
if (Config.PACKAGE_VERSION.startsWith("3.42"))
// etc.

Leif Arne Storset
- 899
- 1
- 8
- 19