Procent baterii JS

navigator.getBattery()
  .then(function(battery) {
    console.log(battery.level);
});
Muddy Macaw