-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscreen.html
More file actions
25 lines (25 loc) · 1021 Bytes
/
screen.html
File metadata and controls
25 lines (25 loc) · 1021 Bytes
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
<p id="props" style="font:1,5em sans-serif"></p>
<script>
(function(){
const info = document.getElementById( 'props' )
let width = window.screen.width + 'px'
let height = window.screen.height + 'px'
let availW = window.screen.availWidth + 'px'
let availH = window.screen.availHeight + 'px'
let colors = 'Unknown'
switch(window.screen.colorDepth)
{
case 8 : colors = 'Low Color'; break
case 16 : colors = 'High Color'; break
case 24 : colors = 'True Color'; break
case 32 : colors = 'Deep Color'; break
}
info.innerHTML = 'Screen Resolution: ' + width + ' x ' + height + '<br/>'
info.innerHTML += 'Available Screen Size: ' + availW + ' x ' + availH + '<br/>'
info.innerHTML += 'Color Capability: ' + colors + '<br/>'
if( window.screen.orientation )
{
info.innerHTML += 'Orientation: ' + window.screen.orientation.type
}
})()
</script>