MichalW / gnome-bluetooth-battery-indicator

Gnome-Shell extension displaying battery percentage for bluetooth devices
GNU General Public License v3.0
118 stars 39 forks source link

Fix 'SyntaxError: fields are currently not supported' in gnome-shell version 3.36.9. #39

Closed eirikff closed 2 years ago

eirikff commented 2 years ago

Reportedly, in issue #35, it also doesn't work for other versions.

The fix was to redefine the function _setPercentFromScript to be a function that returns a function. My guess is that previously, that function was defined as a member/field (don't know the correct terminology in JS) and that is, for some odd reason, not supported in some gnome-shell versions.