Bike!Bike! Website!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
371 B

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