From aa92e6463be0d290c7af6a58eeff6225a74cbf80 Mon Sep 17 00:00:00 2001 From: Paramtamtam <7326800+tarampampam@users.noreply.github.com> Date: Sun, 28 Apr 2024 23:06:35 +0400 Subject: [PATCH] =?UTF-8?q?wip:=20=F0=9F=94=95=20temporary=20commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/index/index.html | 8 +- website/sandbox/apple-touch-icon.png | Bin 0 -> 2357 bytes website/sandbox/favicon-16x16.png | Bin 0 -> 562 bytes website/sandbox/favicon-32x32.png | Bin 0 -> 748 bytes website/sandbox/favicon.ico | Bin 0 -> 15086 bytes website/sandbox/index.html | 374 +++++++++++++++++++++++++-- 6 files changed, 359 insertions(+), 23 deletions(-) create mode 100644 website/sandbox/apple-touch-icon.png create mode 100644 website/sandbox/favicon-16x16.png create mode 100644 website/sandbox/favicon-32x32.png create mode 100644 website/sandbox/favicon.ico diff --git a/website/index/index.html b/website/index/index.html index 87f61511..0496218a 100644 --- a/website/index/index.html +++ b/website/index/index.html @@ -1,11 +1,11 @@ - + - - - + + + diff --git a/website/sandbox/apple-touch-icon.png b/website/sandbox/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9bf6a7f1559ab1e63723292d64bdc2a1429d8c4f GIT binary patch literal 2357 zcmV-53Ci|~P)Px#PEbr#MNDaNJKEG_;~U>%qIW<2n$I>K~#9!?Vangq$&)Bx7ym;ZUyoF z{x5p8uU;U80Jgi%@NcT7X1+?TtVBq|&ySClT+%Sh!rLYJ`6KHZOvL$p#ZekuPY;}2 zZc+Rseyl7^PaW_n#8I3}Rvev^J6VWAwx)mw*W`4f$hGS{0au5(QU(01A?Ey-GsY?j zc=pwRt3o^h&x^BST2k&WS>Y67koXNfbISvMaAsZ=qTnCmB{UT9V}z1uM4^Cw1pF&j zn4m(efc{Fr(IEz)mE1n8aNkmBh}Fs!R-WOK3ifO(|K;*wL{c(3uMQ z_JAfc3pw%wdtg@3c>p^emAP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bGb>pRl5W~=Q^Z3%V#`>|QKMyl3 zIJ(JlM@hKtQq86#`2@&53pLf@j(JJ#=l9+EqQ_RYMa=5C#7mSZvDeTm2fda`Eqd&DX~ zfie~vxy73I5x2;tdb{rL zyzTx_x4$6&2W_EwyT9hIo&W#K74o@Px#kWfriMNDaN|t(rPeoyuj;LVCXkQ``g~`ZgBOi zu=AOm@r#u7psDR>YN-In)Bpeg8FW%kQvfqN?focT7z69*#;D(^+iS)~d&|{GNw_qj z0*U|t0Jup+K~xyiHILa6f-nq4gOs))pn%IHt!3X_|Nrj{bv$qPOq1RK0O&~ONu0_^ zgHOl&fHxFEWa*KeIw9h1c|B)qtk^4v63+cVG&pNa7C{hh4;rFoWDy6j+eBLv)n4qp zKztKDjPWAyJLcE(?tUYR{~Wt!8k+87%~^rYv7g8@EH>qC61SBbwG)!7s-j*0f_pL7 zWPWt(+D-TP0v;J+-#TYv`OBco0{OUoso{^R4q4^r;R~4r6Bp z6Cgx@G{a;ABePT>%h=S&#LUDT#0SfONT5nC0O}VJbn-$ql>h($07*qoM6N<$f?x{n A3IG5A literal 0 HcmV?d00001 diff --git a/website/sandbox/favicon-32x32.png b/website/sandbox/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..915c22c2f5823de18464001a03448f1647cce8cc GIT binary patch literal 748 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyEa{HEjtmSN`?>!lvI6;x#X;^) z4C~IxyaaNp1AIbUeKHH5N-I2-R(vWY4`e)%0J0UHDXD=3K_c=X5*YzSq!k|VC_Oha z{r~^}b3MZ+!b*=g<$oMG_R2Hp-`B5iVv}AvdOVRc{B`yE3ro8{PoF*0wE2Da{@=In zKDP9HUApS?w3+XVtG;j9sr)j85$Ft|k|4ie2Htn7>wjJQ`_RBqs@JXE~J?*VP z2lsipIEGl9E}eXHSF-|7%j!_Z?O_wn?p^DB|34>xN5I>S#k2o=JI&Y`Q?~0K(|!KD z>!)YhlyE1UkYHe7Gk+qx+H;ziT{2Iy8|PAnAFi`hcOMH}(d{J@ylCmd4C!aAIjgm7 zQ*=2CeHN&zPSoE1c=M{Zo$Av%zs%6yQff18bsD>aE%VQHj_D2SHa7H&2((AfHP>g} zlaXGZcjg9lW}heQ2WD?QdfC@N`4Rtt zr4@T!e03A1Z7F~7Bk+2z{_NC=E$`k}SxMT>WDl-b__<1M@@B%&lJv0R~`C_gPTCsm=OvLICRr~FT!@q8M@z^u%zm&`4!EbKj5gjra@rNQKI3bXR&5QWn>uADe>=7`J@_R|d> c3%v9gUWp5qd~!0K3bca3)78&qol`;+0Pk){*Z=?k literal 0 HcmV?d00001 diff --git a/website/sandbox/favicon.ico b/website/sandbox/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..53c4c7a1a63c565251586c04e78588e6c5a7f7fa GIT binary patch literal 15086 zcmdU$Ux-~t9mh|I5M2yS(P*=Q?#BPwkQBBDO26!TzF6rp{oJ~R*N zi}poC3HacPkV+*!_@XF=A_*cQh+QGYbd&7fB#nt%>zbHsGJZdE&+qu#xpVG4=kDGZ z5B%~wXU@$0zQ4aSXYQsbHWizT+1Wz8Qykr06z?sHqSGm#w-v={wQUpU{Znr$if^gI z9`(_X;z<$h@w%_a#`$k&=hB2|PIN@HR1){JO^j3adgcb3=%DDQqGeG?2wiwbpF2hm zu#}j7Dc-}qeKAbmeJ;}M1Kj}K-|3n@^tmJS5RMrUv9T8SThE4RNIE>c_k4KI!#&FA z!PuGg_sHNCtis2dYgM4hTumJ;>+a*bB`sSO6(^q>>g*`eFOX%Um#;cb@15Jc$s?h z+2G0YmVVgvk@sDw$n1^HjSN5B#nXoAAne3@j2Vv|%sd}>s2e`>$xGpz&n<@^eD@#W z#iJ|XH^06X>5qT79*nGw_w;-E%U9w!^z${!>4402<%7mkXUMBwyem$?O&vr&m|nYh zGu*flT3?J|EOVgy!ACDvdN>`BJ#t;r*h4Y5sE=igBL|y~g1Jsf=3-9#Xz^6$H0#Qt zruD`5(>Q9)DN%(TyCY{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+ + /** + * The history items array. It's a proxy object to handle the array changes and render the items. + * + * @type {Array} + */ + const historyItems = new Proxy([], { + deleteProperty: function (target, property) { + delete target[property] + + renderHistoryItems(historyList, target) + + return true + }, + set: function (target, property, value) { + target[property] = value + + renderHistoryItems(historyList, target) + + return true + }, + }) + + /** + * Check the user-agent and add it to the history. + * + * @return {Promise} + */ + const check = async () => { + const emptyPlaceholder = '' + const timestamp = Date.now() + + const navigatorBrands = navigator?.userAgentData?.brands + const userAgentDataAsJson = navigator?.userAgentData?.toJSON() + const highEntropyValues = await navigator?.userAgentData?.getHighEntropyValues([ + 'architecture', + 'bitness', + 'formFactor', + 'fullVersionList', + 'model', + 'platformVersion', + 'uaFullVersion', + 'wow64', + ]) + + // capture everything, including the high-entropy values + const data = { + navigator: { + userAgent: navigator.userAgent ?? emptyPlaceholder, + platform: navigator.platform ?? emptyPlaceholder, + oscpu: navigator?.oscpu ?? emptyPlaceholder, + vendor: navigator?.vendor ?? emptyPlaceholder, + userAgentData: { + brands: navigatorBrands ? JSON.stringify(navigatorBrands) : emptyPlaceholder, + mobile: navigator?.userAgentData?.mobile ?? emptyPlaceholder, + platform: navigator?.userAgentData?.platform ?? emptyPlaceholder, + toJSON: userAgentDataAsJson ? JSON.stringify(userAgentDataAsJson) : emptyPlaceholder, + getHighEntropyValues: highEntropyValues ? JSON.stringify(highEntropyValues) : emptyPlaceholder, + }, + }, + timestamp: 0, // set the timestamp later (we need zero for the comparison) + } + + // if the last array item is the same as the current data, don't add it (compare without the timestamp, of course) + if (historyItems.length > 0) { + const lastItem = {...historyItems[historyItems.length - 1]} + lastItem.timestamp = 0 + + if (JSON.stringify(lastItem) === JSON.stringify(data)) { + return + } + } + + // push the data to the history + historyItems.push({...data, timestamp}) + + // and sort the history by the timestamp + historyItems.sort((a, b) => a.timestamp - b.timestamp) + } + + // initial check + check().then(() => console.log('The initial check is done')).catch(console.error) + + // start periodically checking the user-agent + setInterval(() => check().catch(console.error), 5) + + console.log('To get the actual property/method values, you can use one of the following code snippet:\n' + [ + 'navigator.userAgent', + 'navigator.platform', + 'navigator.oscpu', + 'navigator.vendor', + 'navigator.userAgentData.brands', + 'navigator.userAgentData.mobile', + 'navigator.userAgentData.platform', + 'navigator.userAgentData.toJSON()', + "await navigator.userAgentData.getHighEntropyValues(['architecture', 'bitness', 'formFactor', 'fullVersionList', 'model', 'platformVersion', 'uaFullVersion', 'wow64'])", + ].map((s) => '\t ๐Ÿ’ก ' + s).join('\n')) + + // check the highlight.js availability and highlight the code blocks (initially) + const t = setInterval(() => { + if (typeof hljs !== 'undefined' && hljs.highlightAll) { + clearInterval(t) + + hljs.configure({cssSelector: '.key, .value'}) + hljs.highlightAll() + } + }, 100) + + +