-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
37 lines (27 loc) · 1.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>HTML5 Battery Status API</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<a href="https://github.com/cdemi/Battery-Status-API" target='_blank'>
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png">
</a>
<h2 class="title">Battery Status API - Surge Pricing POC</h2>
<div id="batteryNormal" class="initialHide">
Battery more than 50% or charging: Traditional Marketing can be used.
</div>
<div id="batteryLow" class="initialHide">
Battery less than 50% and not charging: Call to action bigger, maybe offer that will expire soon.
</div>
<div id="batteryApiNotSupported" class="initialHide">
The Battery Status API is not supported on this browser. <a href="http://caniuse.com/#feat=battery-status">List of supported browsers.</a>
</div>
<pre id="batteryData" class="initialHide"></pre>
<div>Read <a href='https://blog.cdemi.io/' target='_blank'>cdemi's Blog</a> Post <a href='https://blog.cdemi.io/abusing-the-html5-battery-status-api-for-advertising/' target='_blank'>(Ab)Using the HTML5 Battery Status API for Advertising</a> or <a href='https://github.com/cdemi/Battery-Status-API' target='_blank'>view the source on GitHub</a>.</div>
<script src="script.js"></script>
</body>
</html>