-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
47 lines (44 loc) · 1.2 KB
/
index.html
File metadata and controls
47 lines (44 loc) · 1.2 KB
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
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>detect-gpu-js — check GPU performance in the browser</title>
<meta name="description" content="Rate GPU performance based on set of basic vendor/model/user agent checks.">
<style>
body {
font-size: 2em;
}
.green {
color: green;
}
.red {
color: red;
}
</style>
<script src="detect-gpu-compat.js"></script>
</head>
<body>
<p>
It appears you are using <span id="tier"></span> GPU.
</p>
<p>
Reason: <span id="reason"></span>.
</p>
<script>
window.onload = function() {
DetectGPU.getGPUTier('BAD', true).then(result => {
const tier = result.tier;
const reason = result.reason;
const tierSpan = document.getElementById('tier');
tierSpan.textContent = tier;
if (tier == 'GOOD')
tierSpan.className = 'green';
else
tierSpan.className = 'red';
const reasonSpan = document.getElementById('reason');
reasonSpan.textContent = reason;
});
};
</script>
</body>
</html>