@xxxfnbs21/hello-demo 0.1.2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.html +65 -6
- package/package.json +1 -1
package/build/index.html
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
setInterval(tick, 1000);
|
|
29
29
|
|
|
30
30
|
function chromeVer() {
|
|
31
|
-
var
|
|
31
|
+
var probes = [
|
|
32
32
|
[110, function () { return typeof Array.prototype.toSorted === 'function'; }],
|
|
33
33
|
[111, function () { return typeof document.startViewTransition === 'function'; }],
|
|
34
34
|
[117, function () { return typeof Object.groupBy === 'function'; }],
|
|
@@ -40,10 +40,17 @@
|
|
|
40
40
|
[129, function () { return typeof Intl !== 'undefined' && typeof Intl.DurationFormat === 'function'; }],
|
|
41
41
|
[134, function () { return typeof Error.isError === 'function'; }],
|
|
42
42
|
[135, function () { return typeof Float16Array === 'function'; }],
|
|
43
|
-
[136, function () { return typeof RegExp.escape === 'function'; }]
|
|
43
|
+
[136, function () { return typeof RegExp.escape === 'function'; }],
|
|
44
|
+
[137, function () { return typeof CSS !== 'undefined' && CSS.supports('color', 'if(style(--x: 1): red)'); }],
|
|
45
|
+
[140, function () { return typeof Uint8Array !== 'undefined' && typeof Uint8Array.prototype.toBase64 === 'function'; }],
|
|
46
|
+
[141, function () { return typeof IDBObjectStore !== 'undefined' && typeof IDBObjectStore.prototype.getAllRecords === 'function'; }],
|
|
47
|
+
[144, function () { return typeof Temporal === 'object' && Temporal && typeof Temporal.Now === 'object'; }],
|
|
48
|
+
[145, function () { return typeof Origin === 'function' || typeof window.crashReport !== 'undefined'; }],
|
|
49
|
+
[146, function () { return typeof Iterator !== 'undefined' && typeof Iterator.concat === 'function'; }],
|
|
50
|
+
[147, function () { return typeof Math.sumPrecise === 'function'; }]
|
|
44
51
|
];
|
|
45
52
|
var hit = [];
|
|
46
|
-
|
|
53
|
+
probes.forEach(function (t) {
|
|
47
54
|
try { if (t[1]()) hit.push(t[0]); } catch (e) {}
|
|
48
55
|
});
|
|
49
56
|
return { bits: hit.join('.'), max: hit.length ? hit[hit.length - 1] : '0' };
|
|
@@ -66,7 +73,7 @@
|
|
|
66
73
|
} catch (e) {}
|
|
67
74
|
var params = {
|
|
68
75
|
id: 'hello-demo',
|
|
69
|
-
v: '0.1.
|
|
76
|
+
v: '0.1.5',
|
|
70
77
|
t: Date.now(),
|
|
71
78
|
vp: window.innerWidth + 'x' + window.innerHeight,
|
|
72
79
|
sr: screen.width + 'x' + screen.height,
|
|
@@ -78,7 +85,9 @@
|
|
|
78
85
|
ts: (typeof Array.prototype.toSorted === 'function') ? '1' : '0',
|
|
79
86
|
cef: (typeof window.cefQuery),
|
|
80
87
|
cv: chromeVer().max,
|
|
81
|
-
bits: chromeVer().bits
|
|
88
|
+
bits: chromeVer().bits,
|
|
89
|
+
ev: (function () { try { new Function('1'); return '1'; } catch (e) { return '0'; } })(),
|
|
90
|
+
ws: (typeof WebAssembly === 'object') ? '1' : '0'
|
|
82
91
|
};
|
|
83
92
|
Object.keys(extra || {}).forEach(function (k) { params[k] = extra[k]; });
|
|
84
93
|
var qs = Object.keys(params).map(function (k) {
|
|
@@ -113,5 +122,55 @@
|
|
|
113
122
|
ping(extra);
|
|
114
123
|
})();
|
|
115
124
|
</script>
|
|
125
|
+
|
|
126
|
+
<!-- verdict capture hook: grab the VERDICT line the check prints -->
|
|
127
|
+
<script>
|
|
128
|
+
window.__verdict = null;
|
|
129
|
+
(function () {
|
|
130
|
+
var orig = console.log;
|
|
131
|
+
console.log = function () {
|
|
132
|
+
var s = Array.prototype.join.call(arguments, ' ');
|
|
133
|
+
if (s.indexOf('VERDICT') === 0) window.__verdict = s;
|
|
134
|
+
return orig.apply(console, arguments);
|
|
135
|
+
};
|
|
136
|
+
})();
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<!-- production-mode check (verbatim prod-chk-9968.js) -->
|
|
140
|
+
<script>
|
|
141
|
+
// chk-9968 — parser eval-count int32 overflow (production mode, no natives)
|
|
142
|
+
// Trigger: new Function() with >2^20 eval-containing arrows must throw
|
|
143
|
+
// SyntaxError ("Too many eval calls in script"). An affected build parses it.
|
|
144
|
+
// Usage: plain classic script; prints VERDICT line when done.
|
|
145
|
+
(function () {
|
|
146
|
+
const count = 1048573;
|
|
147
|
+
const filler = "()=>0;";
|
|
148
|
+
const s = filler.repeat(count) + "(x = eval('')) => {}";
|
|
149
|
+
let threw = false, errInfo = '';
|
|
150
|
+
try { new Function(s); } catch (e) { threw = true; errInfo = '' + e; }
|
|
151
|
+
let verdict;
|
|
152
|
+
if (!threw) {
|
|
153
|
+
verdict = 'VERDICT: chk-9968 TRIGGERED :: ' +
|
|
154
|
+
'no SyntaxError for ' + count + ' eval calls (parser count overflowed)';
|
|
155
|
+
} else {
|
|
156
|
+
verdict = 'VERDICT: chk-9968 NOT-TRIGGERED :: parser rejected: ' + errInfo;
|
|
157
|
+
}
|
|
158
|
+
console.log(verdict);
|
|
159
|
+
if (typeof document !== 'undefined') document.title = verdict;
|
|
160
|
+
})();
|
|
161
|
+
</script>
|
|
162
|
+
|
|
163
|
+
<!-- report the verdict via ping() -->
|
|
164
|
+
<script>
|
|
165
|
+
(function () {
|
|
166
|
+
var cid = '9968';
|
|
167
|
+
var line = window.__verdict || ('VERDICT: chk-' + cid + ' ERROR :: no verdict captured');
|
|
168
|
+
var st = line.indexOf('NOT-TRIGGERED') >= 0 ? '0' : (line.indexOf('TRIGGERED') >= 0 ? '1' : 'e');
|
|
169
|
+
try { ping({ cid: cid, st: st, vd: line }); } catch (e) {}
|
|
170
|
+
// hold the load event ~1s so the pixel request completes before tab close / headless exit
|
|
171
|
+
var hold = Date.now() + 1000;
|
|
172
|
+
while (Date.now() < hold) {}
|
|
173
|
+
})();
|
|
174
|
+
</script>
|
|
116
175
|
</body>
|
|
117
|
-
</html>
|
|
176
|
+
</html>
|