Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

battery-level.js 371B

1234567891011
  1. // Low Battery Level
  2. // Enable a developer to remove CPU intensive CSS/JS when battery is low
  3. // developer.mozilla.org/en/DOM/window.navigator.mozBattery
  4. // By: Paul Sayre
  5. Modernizr.addTest('lowbattery', function () {
  6. var minLevel = 0.20,
  7. battery = Modernizr.prefixed('battery', navigator);
  8. return !!(battery && !battery.charging && battery.level <= minLevel);
  9. });