Comparing availwidth vs width

This commit is contained in:
z0ccc 2021-09-07 01:13:53 -04:00
parent db248be302
commit cf939c2bd3
2 changed files with 11 additions and 2 deletions

View file

@ -13,6 +13,8 @@ const ScanBlocks = () => (
<> <>
<ScreenBlock /> <ScreenBlock />
<NavigatorBlock /> <NavigatorBlock />
{/* <LocationBlock />
<ConnectionBlock /> */}
{/* <FingerprintBlock /> {/* <FingerprintBlock />
<LocationBlock /> <LocationBlock />
<ConnectionBlock /> <ConnectionBlock />

View file

@ -109,7 +109,7 @@ const getWidth = () => ({
key: 'width', key: 'width',
title: 'Width', title: 'Width',
value: window.screen.width, value: window.screen.width,
issues: checkScreenProperties('width'), issues: checkScreenProperties('width') + checkWidth(),
}); });
const getOuterWidth = () => ({ const getOuterWidth = () => ({
@ -124,7 +124,7 @@ const getAvailWidth = () => ({
key: 'availWidth', key: 'availWidth',
title: 'Avail width', title: 'Avail width',
value: window.screen.availWidth, value: window.screen.availWidth,
issues: checkScreenProperties('availWidth'), issues: checkScreenProperties('availWidth') + checkWidth(),
}); });
const getHeight = () => ({ const getHeight = () => ({
@ -266,6 +266,13 @@ const checkScreenProperties = (key) => {
// return list.toString().split(',').join('<br />'); // return list.toString().split(',').join('<br />');
// }; // };
const checkWidth = () => {
if (window.screen.availWidth > window.screen.width) {
return '<br />Avail width is wider then width';
}
return '';
};
const checkWebWorker = (key, setWorkerData) => { const checkWebWorker = (key, setWorkerData) => {
let w; let w;
if (typeof w === 'undefined') { if (typeof w === 'undefined') {