4 ms·
How about disabling on battery devices then?
by tazard 9y ago
How about disabling on battery devices then?
- amelius 9y agoThen everybody would unplug their laptops to save on their energy bill.
- ChrisSD 9y agoIs there a battery API for websites? The old one was deprecated because it caused too many issues (e.g. with fingerprinting).
- berkes 9y agoThis is what I -somewhat- did in the example: I've disabled it for mobile. I don't think browsers have an API to detect what power-source the underlying machine is using, though.
- berkes 9y agoTurns out that the disabling did not work. It is possible to detect mobile and disable it completely, but for now, because it's mostly demo material, I'll leave it enabled for mobile too. In a real-world scenario you'd probably show a message or explain why a mobile user cannot use it. That would certainly give you credits.