-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
temp: added screenproperties checker to ibiss
- Loading branch information
1 parent
999bd9f
commit e50f137
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Pennions Screen checker</title> | ||
</head> | ||
<style> | ||
pre { | ||
background-color: lightgrey; | ||
border: 0.5px solid black; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
width: 50%; | ||
margin-top: 10rem; | ||
} | ||
</style> | ||
|
||
<body> | ||
|
||
<pre id="view"> | ||
|
||
</pre> | ||
<script> | ||
window.onload = () => { | ||
const viewportWidth = window.innerWidth; | ||
const viewportHeight = window.innerHeight; | ||
const devicePixelRatio = window.devicePixelRatio; | ||
|
||
let scalingFactor = window.devicePixelRatio; // Scaling factor | ||
let element = document.querySelector("body"); | ||
let computedFontSize = window.getComputedStyle(element).fontSize; // Adjusted font size | ||
|
||
let data = `Zoom level: ${scalingFactor}\r\n`; | ||
data += `Adjusted font size of body: ${computedFontSize}\r\n`; | ||
data += `Device Pixel Ratio: ${devicePixelRatio}\r\n`; | ||
data += `Viewport Width: ${viewportWidth}\r\n`; | ||
data += `Viewport Height: ${viewportHeight}\r\n`; | ||
document.getElementById('view').innerText = data; | ||
} | ||
</script> | ||
|
||
</body> | ||
|
||
</html> |