PageSourceSearch

https://whatmyuseragent.com/js/home.js?v=6a872678b2d

js whatmyuseragent.com collected 2026-10-02 14:35:19 UTC 2,861 bytes, 79 lines download raw bytes

1(function () {
2    'use strict';
3
4    function copyWithFallback(text) {
5        var buffer = document.createElement('textarea');
6        buffer.className = 'wmua-copy-buffer';
7        buffer.value = text;
8        document.body.appendChild(buffer);
9        buffer.focus();
10        buffer.select();
11        var copied = document.execCommand('copy');
12        document.body.removeChild(buffer);
13        return copied;
14    }
15
16    window.copyUA = function () {
17        var source = document.getElementById('ua');
18        var button = document.getElementById('copyBtn');
19        if (!source || !button) {
20            return;
21        }
22        var text = source.innerText;
23        var done = function () {
24            button.textContent = 'Copied!';
25            window.setTimeout(function () { button.textContent = 'Copy'; }, 1500);
26        };
27        if (navigator.clipboard && window.isSecureContext) {
28            navigator.clipboard.writeText(text).then(done).catch(function () {
29                if (copyWithFallback(text)) {
30                    done();
31                }
32            });
33        } else if (copyWithFallback(text)) {
34            done();
35        }
36    };
37
38    function setText(id, value) {
39        var element = document.getElementById(id);
40        if (element) {
41            element.textContent = value;
42        }
43    }
44
45    document.addEventListener('DOMContentLoaded', function () {
46        setText('javascript-status', 'Enabled');
47        setText('cookie-status', navigator.cookieEnabled ? 'Enabled' : 'Disabled');
48        setText('screen-resolution', screen.width + 'x' + screen.height);
49        setText('window-size', (window.innerWidth || document.documentElement.clientWidth) + 'x'
50            + (window.innerHeight || document.documentElement.clientHeight));
51
52        if (!navigator.userAgentData) {
53            return;
54        }
55        navigator.userAgentData.getHighEntropyValues(['platformVersion']).then(function (ua) {
56            if (navigator.userAgentData.platform === 'Windows') {
57                var major = parseInt((ua.platformVersion || '0').split('.')[0], 10);
58                if (major >= 13) {
59                    setText('os_version', '11');
60                }
61            }
62        }).catch(function () {});
63
64        navigator.userAgentData.getHighEntropyValues(['architecture', 'bitness']).then(function (ua) {
65            if (navigator.userAgentData.platform !== 'Windows') {
66                return;
67            }
68            var label = '';
69            if (ua.architecture === 'x86') {
70                label = ua.bitness === '64' ? 'x86_64' : 'x86';
71            } else if (ua.architecture === 'arm') {
72                label = ua.bitness === '64' ? 'ARM64' : 'ARM32';
73            }
74            if (label) {
75                setText('platform_version', label);
76            }
77        }).catch(function () {});
78    });
79}());

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.