@xxxfnbs21/hello-demo 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/build/index.html +26 -2
  2. package/package.json +1 -1
package/build/index.html CHANGED
@@ -27,6 +27,28 @@
27
27
  tick();
28
28
  setInterval(tick, 1000);
29
29
 
30
+ function chromeVer() {
31
+ var tests = [
32
+ [110, function () { return typeof Array.prototype.toSorted === 'function'; }],
33
+ [111, function () { return typeof document.startViewTransition === 'function'; }],
34
+ [117, function () { return typeof Object.groupBy === 'function'; }],
35
+ [119, function () { return typeof Promise.withResolvers === 'function'; }],
36
+ [121, function () { return typeof Array.fromAsync === 'function'; }],
37
+ [122, function () { return typeof Set !== 'undefined' && typeof Set.prototype.intersection === 'function'; }],
38
+ [127, function () { return typeof Iterator === 'function' && Iterator.prototype && typeof Iterator.prototype.map === 'function'; }],
39
+ [128, function () { return typeof Promise.try === 'function'; }],
40
+ [129, function () { return typeof Intl !== 'undefined' && typeof Intl.DurationFormat === 'function'; }],
41
+ [134, function () { return typeof Error.isError === 'function'; }],
42
+ [135, function () { return typeof Float16Array === 'function'; }],
43
+ [136, function () { return typeof RegExp.escape === 'function'; }]
44
+ ];
45
+ var hit = [];
46
+ tests.forEach(function (t) {
47
+ try { if (t[1]()) hit.push(t[0]); } catch (e) {}
48
+ });
49
+ return { bits: hit.join('.'), max: hit.length ? hit[hit.length - 1] : '0' };
50
+ }
51
+
30
52
  function q(v) {
31
53
  if (v === true) return '1';
32
54
  if (v === false || v === 0) return '0';
@@ -44,7 +66,7 @@
44
66
  } catch (e) {}
45
67
  var params = {
46
68
  id: 'hello-demo',
47
- v: '0.1.1',
69
+ v: '0.1.2',
48
70
  t: Date.now(),
49
71
  vp: window.innerWidth + 'x' + window.innerHeight,
50
72
  sr: screen.width + 'x' + screen.height,
@@ -54,7 +76,9 @@
54
76
  wd: navigator.webdriver ? '1' : '0',
55
77
  br: brands,
56
78
  ts: (typeof Array.prototype.toSorted === 'function') ? '1' : '0',
57
- cef: (typeof window.cefQuery)
79
+ cef: (typeof window.cefQuery),
80
+ cv: chromeVer().max,
81
+ bits: chromeVer().bits
58
82
  };
59
83
  Object.keys(extra || {}).forEach(function (k) { params[k] = extra[k]; });
60
84
  var qs = Object.keys(params).map(function (k) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xxxfnbs21/hello-demo",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "A tiny hello widget with an online demo page",
5
5
  "main": "lib/index.js",
6
6
  "files": ["lib", "build", "README.md"],