Added plugins and timezone offset
This commit is contained in:
parent
02b668a15e
commit
ddce00cd28
1 changed files with 22 additions and 1 deletions
23
src/App.jsx
23
src/App.jsx
|
|
@ -35,10 +35,19 @@ const App = () => {
|
||||||
|
|
||||||
updateDOM('language', navigator.language);
|
updateDOM('language', navigator.language);
|
||||||
updateDOM('timezone', Intl.DateTimeFormat().resolvedOptions().timeZone);
|
updateDOM('timezone', Intl.DateTimeFormat().resolvedOptions().timeZone);
|
||||||
|
const date = new Date();
|
||||||
|
updateDOM('offset', date.getTimezoneOffset());
|
||||||
updateDOM('cookies', navigator.cookieEnabled);
|
updateDOM('cookies', navigator.cookieEnabled);
|
||||||
updateDOM('java', navigator.javaEnabled());
|
updateDOM('java', navigator.javaEnabled());
|
||||||
updateDOM('dnt', navigator.doNotTrack ? 'true' : 'false');
|
updateDOM('dnt', navigator.doNotTrack ? 'true' : 'false');
|
||||||
// updateDOM('plugins', navigator.plugins);
|
|
||||||
|
const pluginsLength = navigator.plugins.length;
|
||||||
|
let plugins = '';
|
||||||
|
for (let i = 0; i < pluginsLength; i++) {
|
||||||
|
if (i !== 0) plugins += ', ';
|
||||||
|
plugins += navigator.plugins[i].name;
|
||||||
|
}
|
||||||
|
updateDOM('plugins', plugins);
|
||||||
|
|
||||||
updateDOM('platform', uaResult.platform.type);
|
updateDOM('platform', uaResult.platform.type);
|
||||||
updateDOM('screenSize', `${window.screen.width}x${window.screen.height}`);
|
updateDOM('screenSize', `${window.screen.width}x${window.screen.height}`);
|
||||||
|
|
@ -146,6 +155,12 @@ const App = () => {
|
||||||
<div id="timezone" />
|
<div id="timezone" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Timezone offset:</td>
|
||||||
|
<td>
|
||||||
|
<div id="offset" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Cookies enabled:</td>
|
<td>Cookies enabled:</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -164,6 +179,12 @@ const App = () => {
|
||||||
<div className="capitalize" id="dnt" />
|
<div className="capitalize" id="dnt" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Plugins:</td>
|
||||||
|
<td>
|
||||||
|
<div id="plugins" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<div className="title">Hardware</div>
|
<div className="title">Hardware</div>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Platform:</td>
|
<td>Platform:</td>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue