@browserless.io/browserless 2.16.0 → 2.16.1

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 (58) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/bin/browserless.js +6 -4
  3. package/bin/scaffold/src/hello-world.http.ts +1 -1
  4. package/build/routes/chrome/http/content.post.body.json +38 -8
  5. package/build/routes/chrome/http/pdf.post.body.json +38 -8
  6. package/build/routes/chrome/http/scrape.post.body.json +38 -8
  7. package/build/routes/chrome/http/screenshot.post.body.json +38 -8
  8. package/build/routes/chromium/http/content.post.body.json +38 -8
  9. package/build/routes/chromium/http/pdf.post.body.json +38 -8
  10. package/build/routes/chromium/http/scrape.post.body.json +38 -8
  11. package/build/routes/chromium/http/screenshot.post.body.json +38 -8
  12. package/extensions/ublock/_locales/be/messages.json +1 -1
  13. package/extensions/ublock/_locales/br_FR/messages.json +2 -2
  14. package/extensions/ublock/_locales/bs/messages.json +5 -5
  15. package/extensions/ublock/_locales/eu/messages.json +1 -1
  16. package/extensions/ublock/_locales/it/messages.json +21 -21
  17. package/extensions/ublock/_locales/kn/messages.json +13 -13
  18. package/extensions/ublock/_locales/lt/messages.json +1 -1
  19. package/extensions/ublock/_locales/ms/messages.json +9 -9
  20. package/extensions/ublock/_locales/nb/messages.json +2 -2
  21. package/extensions/ublock/_locales/no/messages.json +2 -2
  22. package/extensions/ublock/_locales/sv/messages.json +2 -2
  23. package/extensions/ublock/_locales/tr/messages.json +4 -4
  24. package/extensions/ublock/_locales/zh_TW/messages.json +17 -17
  25. package/extensions/ublock/assets/assets.json +4 -3
  26. package/extensions/ublock/assets/resources/scriptlets.js +208 -57
  27. package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +3584 -4032
  28. package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +3732 -1683
  29. package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +27 -205
  30. package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +465 -434
  31. package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +3232 -1382
  32. package/extensions/ublock/assets/ublock/badware.min.txt +867 -408
  33. package/extensions/ublock/assets/ublock/filters.min.txt +1382 -937
  34. package/extensions/ublock/assets/ublock/privacy.min.txt +43 -56
  35. package/extensions/ublock/assets/ublock/quick-fixes.min.txt +127 -71
  36. package/extensions/ublock/assets/ublock/unbreak.min.txt +145 -27
  37. package/extensions/ublock/js/contentscript-extra.js +25 -0
  38. package/extensions/ublock/js/contentscript.js +3 -1
  39. package/extensions/ublock/js/cosmetic-filtering.js +8 -7
  40. package/extensions/ublock/js/dom.js +8 -4
  41. package/extensions/ublock/js/epicker-ui.js +1 -1
  42. package/extensions/ublock/js/s14e-serializer.js +2 -1
  43. package/extensions/ublock/js/static-filtering-parser.js +255 -254
  44. package/extensions/ublock/js/storage.js +7 -6
  45. package/extensions/ublock/js/traffic.js +33 -34
  46. package/extensions/ublock/manifest.json +1 -1
  47. package/extensions/ublock/popup-fenix.html +1 -1
  48. package/package.json +15 -15
  49. package/static/debugger/index.html +1 -1
  50. package/static/debugger/router.js +1 -0
  51. package/static/debugger/tracker.js +1 -1
  52. package/static/docs/swagger.json +40 -10
  53. package/static/docs/swagger.min.json +39 -9
  54. package/static/function/client.js +4120 -16782
  55. package/static/function/index.html +4120 -16782
  56. package/static/debugger/router.bundle.js +0 -2
  57. package/static/debugger/router.bundle.js.map +0 -1
  58. package/static/debugger/router.d.ts +0 -2
@@ -19,29 +19,23 @@
19
19
  Home: https://github.com/gorhill/uBlock
20
20
  */
21
21
 
22
- /* globals browser */
23
-
24
- 'use strict';
25
-
26
22
  /******************************************************************************/
27
23
 
24
+ import * as fc from './filtering-context.js';
25
+ import * as sfp from './static-filtering-parser.js';
26
+ import {
27
+ sessionFirewall,
28
+ sessionSwitches,
29
+ sessionURLFiltering,
30
+ } from './filtering-engines.js';
28
31
  import htmlFilteringEngine from './html-filtering.js';
29
32
  import httpheaderFilteringEngine from './httpheader-filtering.js';
33
+ import { isNetworkURI } from './uri-utils.js';
30
34
  import logger from './logger.js';
31
35
  import scriptletFilteringEngine from './scriptlet-filtering.js';
32
36
  import staticNetFilteringEngine from './static-net-filtering.js';
33
37
  import textEncode from './text-encode.js';
34
38
  import µb from './background.js';
35
- import * as sfp from './static-filtering-parser.js';
36
- import * as fc from './filtering-context.js';
37
- import { isNetworkURI } from './uri-utils.js';
38
-
39
- import {
40
- sessionFirewall,
41
- sessionSwitches,
42
- sessionURLFiltering,
43
- } from './filtering-engines.js';
44
-
45
39
 
46
40
  /******************************************************************************/
47
41
 
@@ -559,11 +553,16 @@ const onHeadersReceived = function(details) {
559
553
  if ( httpheaderFilteringEngine.apply(fctxt, responseHeaders) === true ) {
560
554
  modifiedHeaders = true;
561
555
  }
562
- if ( injectCSP(fctxt, pageStore, responseHeaders) === true ) {
563
- modifiedHeaders = true;
564
- }
565
- if ( injectPP(fctxt, pageStore, responseHeaders) === true ) {
566
- modifiedHeaders = true;
556
+
557
+ // https://github.com/uBlockOrigin/uBlock-issues/issues/229#issuecomment-2220354261
558
+ // Inject CSP/PP in document resource only
559
+ if ( fctxt.isDocument() ) {
560
+ if ( injectCSP(fctxt, pageStore, responseHeaders) === true ) {
561
+ modifiedHeaders = true;
562
+ }
563
+ if ( injectPP(fctxt, pageStore, responseHeaders) === true ) {
564
+ modifiedHeaders = true;
565
+ }
567
566
  }
568
567
 
569
568
  // https://bugzilla.mozilla.org/show_bug.cgi?id=1376932
@@ -695,7 +694,7 @@ const bodyFilterer = (( ) => {
695
694
  'audio/x-mpegurl',
696
695
  ]);
697
696
  const BINARY_TYPES = fc.FONT | fc.IMAGE | fc.MEDIA | fc.WEBSOCKET;
698
- const MAX_BUFFER_LENGTH = 3 * 1024 * 1024;
697
+ const MAX_RESPONSE_BUFFER_LENGTH = 10 * 1024 * 1024;
699
698
 
700
699
  let textDecoder, textEncoder;
701
700
  let mime = '';
@@ -703,12 +702,12 @@ const bodyFilterer = (( ) => {
703
702
 
704
703
  const contentTypeFromDetails = details => {
705
704
  switch ( details.type ) {
706
- case 'script':
707
- return 'text/javascript; charset=utf-8';
708
- case 'stylesheet':
709
- return 'text/css';
710
- default:
711
- break;
705
+ case 'script':
706
+ return 'text/javascript; charset=utf-8';
707
+ case 'stylesheet':
708
+ return 'text/css';
709
+ default:
710
+ break;
712
711
  }
713
712
  return '';
714
713
  };
@@ -721,13 +720,13 @@ const bodyFilterer = (( ) => {
721
720
 
722
721
  const charsetFromMime = mime => {
723
722
  switch ( mime ) {
724
- case 'application/xml':
725
- case 'application/xhtml+xml':
726
- case 'text/html':
727
- case 'text/css':
728
- return;
729
- default:
730
- break;
723
+ case 'application/xml':
724
+ case 'application/xhtml+xml':
725
+ case 'text/html':
726
+ case 'text/css':
727
+ return;
728
+ default:
729
+ break;
731
730
  }
732
731
  return 'utf-8';
733
732
  };
@@ -811,7 +810,7 @@ const bodyFilterer = (( ) => {
811
810
  buffer.set(session.buffer);
812
811
  buffer.set(new Uint8Array(ev.data), session.buffer.byteLength);
813
812
  session.buffer = buffer;
814
- if ( session.buffer.length >= MAX_BUFFER_LENGTH ) {
813
+ if ( session.buffer.length >= MAX_RESPONSE_BUFFER_LENGTH ) {
815
814
  sessions.delete(this);
816
815
  this.write(session.buffer);
817
816
  this.disconnect();
@@ -111,7 +111,7 @@
111
111
  "storage": {
112
112
  "managed_schema": "managed_storage.json"
113
113
  },
114
- "version": "1.58.0",
114
+ "version": "1.59.0",
115
115
  "web_accessible_resources": [
116
116
  "/web_accessible_resources/*"
117
117
  ]
@@ -16,7 +16,7 @@
16
16
  <div id="panes">
17
17
  <div id="main">
18
18
  <div id="sticky">
19
- <div id="hostname"><span></span>&shy;<span></span></div>
19
+ <div id="hostname"><span></span>&shy;<span>&nbsp;</span></div>
20
20
  <div id="stickyTools">
21
21
  <div class="rulesetTools">
22
22
  <span id="saveRules" class="fa-icon" data-i18n-title="popupTipSaveRules">lock</span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browserless.io/browserless",
3
- "version": "2.16.0",
3
+ "version": "2.16.1",
4
4
  "license": "SSPL",
5
5
  "description": "The browserless platform",
6
6
  "author": "browserless.io",
@@ -48,38 +48,38 @@
48
48
  "tsconfig.json"
49
49
  ],
50
50
  "dependencies": {
51
- "debug": "^4.3.5",
51
+ "debug": "^4.3.6",
52
52
  "del": "^7.0.0",
53
53
  "enjoi": "^9.0.1",
54
- "file-type": "^19.1.1",
54
+ "file-type": "^19.4.0",
55
55
  "get-port": "^7.1.0",
56
56
  "gradient-string": "^2.0.0",
57
57
  "http-proxy": "^1.18.1",
58
- "lighthouse": "^12.1.0",
58
+ "lighthouse": "^12.2.0",
59
59
  "micromatch": "^4.0.7",
60
60
  "playwright-1.41": "npm:playwright-core@1.41.2",
61
61
  "playwright-1.42": "npm:playwright-core@1.42.1",
62
62
  "playwright-1.43": "npm:playwright-core@1.43.1",
63
63
  "playwright-1.44": "npm:playwright-core@1.44.1",
64
- "playwright-core": "^1.45.1",
65
- "puppeteer-core": "^22.13.0",
64
+ "playwright-core": "^1.46.0",
65
+ "puppeteer-core": "^23.0.2",
66
66
  "puppeteer-extra": "^3.3.6",
67
67
  "puppeteer-extra-plugin-stealth": "^2.11.2",
68
68
  "queue": "^7.0.0",
69
- "systeminformation": "^5.22.11",
69
+ "systeminformation": "^5.23.4",
70
70
  "tar-fs": "^3.0.6"
71
71
  },
72
72
  "optionalDependencies": {
73
- "@types/chai": "^4.3.16",
73
+ "@types/chai": "^4.3.17",
74
74
  "@types/debug": "^4.1.12",
75
75
  "@types/gradient-string": "^1.1.6",
76
- "@types/http-proxy": "^1.17.14",
76
+ "@types/http-proxy": "^1.17.15",
77
77
  "@types/micromatch": "^4.0.9",
78
78
  "@types/mocha": "^10.0.7",
79
- "@types/node": "^20.14.10",
79
+ "@types/node": "^22.1.0",
80
80
  "@types/sinon": "^17.0.3",
81
- "@typescript-eslint/eslint-plugin": "^7.16.0",
82
- "@typescript-eslint/parser": "^7.16.0",
81
+ "@typescript-eslint/eslint-plugin": "^7.18.0",
82
+ "@typescript-eslint/parser": "^7.18.0",
83
83
  "assert": "^2.0.0",
84
84
  "chai": "^5.1.1",
85
85
  "cross-env": "^7.0.3",
@@ -90,13 +90,13 @@
90
90
  "eslint-plugin-typescript-sort-keys": "^3.2.0",
91
91
  "extract-zip": "^2.0.1",
92
92
  "gunzip-maybe": "^1.4.2",
93
- "marked": "^13.0.2",
94
- "mocha": "^10.6.0",
93
+ "marked": "^14.0.0",
94
+ "mocha": "^10.7.0",
95
95
  "move-file": "^3.1.0",
96
96
  "prettier": "^3.3.3",
97
97
  "sinon": "^18.0.0",
98
98
  "ts-node": "^10.9.2",
99
- "typescript": "^5.5.3",
99
+ "typescript": "^5.5.4",
100
100
  "typescript-json-schema": "^0.64.0"
101
101
  },
102
102
  "playwrightVersions": {
@@ -1 +1 @@
1
- <!doctype html><html><head><script src="router.bundle.js"></script><meta charset="utf-8"/><link rel="shortcut icon" href="favicon.ico"/><link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap" rel="stylesheet"><title>Browserless debugger</title><link rel="icon" href="favicon.ico"><script defer="defer" src="app.bundle.js"></script><script defer="defer" src="editor.worker.bundle.js"></script><script defer="defer" src="ts.worker.bundle.js"></script><script defer="defer" src="router.bundle.js"></script></head><body><header><div class="logo"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="32px" viewBox="0 0 32 32" version="1.1"><defs><linearGradient id="linear0" gradientUnits="userSpaceOnUse" x1="220.8" y1="854.4" x2="761.6" y2="518.4" gradientTransform="matrix(0.03125,0,0,0.03125,0,0)"><stop offset="0" style="stop-color:rgb(100%,23.529412%,58.431373%);stop-opacity:1;"/><stop offset="1" style="stop-color:rgb(100%,77.254902%,31.372549%);stop-opacity:1;"/></linearGradient></defs><g id="surface1"><path style="stroke:none;fill-rule:nonzero;fill:url(#linear0);" d="M 5.613281 2.445312 C 5.601562 3.789062 5.585938 10.472656 5.574219 17.296875 L 5.558594 29.703125 C 6.542969 30.355469 7.257812 30.828125 7.78125 31.171875 C 8.304688 31.515625 8.804688 31.84375 8.890625 31.898438 C 8.976562 31.953125 9.066406 32 9.085938 32 C 9.105469 32 10.050781 31.550781 11.179688 30.996094 C 12.308594 30.445312 13.507812 29.863281 13.84375 29.699219 L 14.453125 29.402344 C 14.457031 28.304688 14.460938 28.25 14.539062 28 C 14.585938 27.851562 14.664062 27.65625 14.710938 27.5625 C 14.757812 27.46875 14.867188 27.292969 14.945312 27.171875 C 15.050781 27.015625 15.867188 26.179688 17.792969 24.25 L 20.492188 21.546875 C 20.402344 21.160156 20.359375 20.800781 20.339844 20.5 C 20.3125 20.085938 20.3125 19.855469 20.339844 19.5625 C 20.359375 19.347656 20.402344 19.046875 20.4375 18.890625 C 20.472656 18.734375 20.535156 18.496094 20.582031 18.359375 C 20.625 18.222656 20.707031 18.003906 20.757812 17.875 C 20.8125 17.746094 20.925781 17.519531 21.007812 17.367188 C 21.085938 17.214844 21.15625 17.089844 21.15625 17.085938 C 21.160156 17.082031 20.113281 16.464844 18.835938 15.71875 L 16.507812 14.359375 C 16.476562 13.898438 16.46875 12.195312 16.46875 10.28125 C 16.46875 8.367188 16.460938 6.691406 16.449219 6.5625 L 16.429688 6.328125 C 13.664062 4.695312 12.851562 4.226562 12.835938 4.238281 C 12.820312 4.242188 12.8125 8.25 12.8125 13.140625 C 12.8125 18.03125 12.820312 22.03125 12.835938 22.03125 C 12.851562 22.03125 13.042969 21.949219 13.265625 21.847656 C 13.488281 21.746094 14.042969 21.492188 14.5 21.285156 C 14.957031 21.070312 15.671875 20.742188 16.09375 20.546875 C 16.515625 20.351562 17.289062 19.992188 17.8125 19.753906 L 18.765625 19.316406 C 18.800781 21.214844 18.804688 21.835938 18.800781 21.921875 C 18.792969 22.007812 18.785156 22.320312 18.785156 22.609375 L 18.78125 23.140625 C 18.066406 23.488281 16.679688 24.164062 15.234375 24.875 C 13.789062 25.582031 11.90625 26.507812 11.046875 26.929688 C 10.1875 27.351562 9.441406 27.710938 9.390625 27.734375 L 9.296875 27.773438 C 9.257812 25.128906 9.25 19.34375 9.25 13.210938 L 9.25 2.0625 C 8.804688 1.804688 8.347656 1.539062 7.953125 1.3125 C 7.558594 1.082031 6.886719 0.695312 6.460938 0.445312 C 6.035156 0.199219 5.675781 0 5.660156 0 C 5.648438 0 5.625 1.101562 5.613281 2.445312 Z M 25.375 15.207031 C 25.332031 15.210938 25.199219 15.242188 25.078125 15.265625 C 24.960938 15.292969 24.753906 15.34375 24.625 15.378906 C 24.496094 15.414062 24.363281 15.457031 24.328125 15.472656 C 24.292969 15.484375 24.160156 15.539062 24.03125 15.597656 C 23.902344 15.648438 23.679688 15.765625 23.53125 15.851562 C 23.382812 15.941406 23.238281 16.035156 23.203125 16.066406 C 23.167969 16.097656 23.132812 16.125 23.117188 16.125 C 23.101562 16.125 23.027344 16.179688 22.949219 16.242188 C 22.871094 16.304688 22.699219 16.464844 22.566406 16.59375 C 22.433594 16.722656 22.242188 16.933594 22.140625 17.0625 C 22.039062 17.191406 21.890625 17.402344 21.808594 17.53125 C 21.730469 17.660156 21.617188 17.871094 21.554688 18 C 21.492188 18.128906 21.394531 18.382812 21.335938 18.5625 C 21.273438 18.742188 21.210938 18.960938 21.195312 19.046875 C 21.175781 19.132812 21.144531 19.320312 21.125 19.46875 C 21.101562 19.632812 21.09375 19.917969 21.101562 20.21875 C 21.113281 20.484375 21.132812 20.808594 21.152344 20.9375 C 21.171875 21.066406 21.230469 21.308594 21.28125 21.476562 L 21.375 21.78125 C 17.003906 26.152344 15.6875 27.476562 15.632812 27.546875 C 15.582031 27.617188 15.503906 27.734375 15.460938 27.8125 C 15.414062 27.890625 15.351562 28.03125 15.3125 28.125 C 15.257812 28.265625 15.238281 28.378906 15.226562 28.734375 C 15.210938 29.085938 15.222656 29.210938 15.265625 29.359375 C 15.292969 29.460938 15.355469 29.632812 15.40625 29.734375 C 15.457031 29.835938 15.570312 30.011719 15.65625 30.125 C 15.746094 30.238281 15.914062 30.398438 16.027344 30.484375 C 16.140625 30.570312 16.277344 30.664062 16.328125 30.695312 C 16.382812 30.722656 16.507812 30.777344 16.609375 30.820312 C 16.777344 30.882812 16.847656 30.890625 17.296875 30.890625 C 17.746094 30.890625 17.816406 30.882812 17.984375 30.820312 C 18.085938 30.777344 18.234375 30.710938 18.3125 30.664062 C 18.390625 30.621094 18.507812 30.542969 18.578125 30.492188 C 18.648438 30.4375 19.972656 29.121094 21.523438 27.570312 L 24.34375 24.75 C 24.839844 24.902344 25.074219 24.960938 25.1875 24.976562 C 25.300781 24.988281 25.59375 25.007812 25.84375 25.019531 C 26.132812 25.03125 26.410156 25.023438 26.609375 25 C 26.78125 24.976562 27.027344 24.933594 27.15625 24.902344 C 27.285156 24.871094 27.523438 24.800781 27.6875 24.742188 C 27.851562 24.679688 28.089844 24.582031 28.21875 24.519531 C 28.347656 24.453125 28.503906 24.371094 28.5625 24.335938 C 28.621094 24.300781 28.800781 24.175781 28.953125 24.058594 C 29.109375 23.945312 29.351562 23.734375 29.492188 23.589844 C 29.636719 23.445312 29.835938 23.222656 29.929688 23.09375 C 30.027344 22.964844 30.183594 22.734375 30.277344 22.578125 C 30.367188 22.421875 30.492188 22.179688 30.554688 22.03125 C 30.617188 21.882812 30.691406 21.675781 30.726562 21.5625 C 30.757812 21.449219 30.8125 21.242188 30.851562 21.09375 C 30.914062 20.855469 30.921875 20.75 30.921875 20.109375 C 30.921875 19.417969 30.917969 19.378906 30.832031 19.046875 C 30.78125 18.859375 30.726562 18.671875 30.707031 18.632812 C 30.6875 18.589844 30.601562 18.523438 30.515625 18.476562 C 30.367188 18.398438 30.351562 18.398438 30.21875 18.433594 C 30.09375 18.46875 29.9375 18.613281 28.8125 19.734375 C 28.117188 20.429688 27.507812 21.011719 27.460938 21.027344 C 27.40625 21.050781 27 21.0625 26.382812 21.0625 C 25.445312 21.0625 25.382812 21.058594 25.289062 21 C 25.234375 20.964844 25.160156 20.890625 25.125 20.835938 C 25.066406 20.742188 25.0625 20.679688 25.0625 19.726562 C 25.0625 19.050781 25.074219 18.695312 25.097656 18.648438 C 25.117188 18.609375 25.695312 18.007812 26.390625 17.3125 C 27.425781 16.273438 27.65625 16.023438 27.6875 15.921875 C 27.71875 15.820312 27.714844 15.773438 27.675781 15.671875 C 27.648438 15.601562 27.589844 15.511719 27.542969 15.46875 C 27.488281 15.414062 27.355469 15.363281 27.113281 15.300781 C 26.789062 15.214844 26.71875 15.210938 26.109375 15.199219 C 25.75 15.195312 25.417969 15.199219 25.375 15.207031 Z M 25.375 15.207031 "/></g></svg><h2>Browserless Debugger</h2></div><div class="group"><button id="download"><svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg></button> <button id="run-button"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 -5 24 30" height="20px" width="20px" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#fff" stroke-width="2" d="M3,22.0000002 L21,12 L3,2 L3,22.0000002 Z M5,19 L17.5999998,11.9999999 L5,5 L5,19 Z M7,16 L14.1999999,12 L7,8 L7,16 Z M9,13 L10.8,12 L9,11 L9,13 Z"></path></svg></button></div></header><main><ul id="side-nav"><input value="editor" type="radio" name="open-panel" id="editor-button-radio" class="active" title="Code Editor" checked="checked"><label for="editor-button-radio" id="editor-button"><svg viewBox="0 0 24 24" width="24" height="24" stroke="#ccc" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></label> <input value="sessions" type="radio" name="open-panel" id="sessions-button-radio" title="Session viewer"><label for="sessions-button-radio" id="sessions-button"><svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg></label> <input value="settings" type="radio" name="open-panel" id="settings-button-radio" title="Settings"><label for="settings-button-radio" id="settings-button"><svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></label></ul><div id="editor"><ol id="editor-tabs"></ol><div id="code"></div><div id="sessions"></div><div id="settings"></div></div><div id="resize-main" class="resizer-horizontal"></div><div id="runner"><div class="fixed-message"><code>Click the ► button to run your code.</code></div></div></main></body><script src="./tracker.js"></script></html>
1
+ <!doctype html><html><head><script src="./router.js"></script><meta charset="utf-8"/><link rel="shortcut icon" href="favicon.ico"/><link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap" rel="stylesheet"><title>Browserless debugger</title><link rel="icon" href="favicon.ico"><script defer="defer" src="app.bundle.js"></script><script defer="defer" src="editor.worker.bundle.js"></script><script defer="defer" src="ts.worker.bundle.js"></script></head><body><header><div class="logo"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="32px" viewBox="0 0 32 32" version="1.1"><defs><linearGradient id="linear0" gradientUnits="userSpaceOnUse" x1="220.8" y1="854.4" x2="761.6" y2="518.4" gradientTransform="matrix(0.03125,0,0,0.03125,0,0)"><stop offset="0" style="stop-color:rgb(100%,23.529412%,58.431373%);stop-opacity:1;"/><stop offset="1" style="stop-color:rgb(100%,77.254902%,31.372549%);stop-opacity:1;"/></linearGradient></defs><g id="surface1"><path style="stroke:none;fill-rule:nonzero;fill:url(#linear0);" d="M 5.613281 2.445312 C 5.601562 3.789062 5.585938 10.472656 5.574219 17.296875 L 5.558594 29.703125 C 6.542969 30.355469 7.257812 30.828125 7.78125 31.171875 C 8.304688 31.515625 8.804688 31.84375 8.890625 31.898438 C 8.976562 31.953125 9.066406 32 9.085938 32 C 9.105469 32 10.050781 31.550781 11.179688 30.996094 C 12.308594 30.445312 13.507812 29.863281 13.84375 29.699219 L 14.453125 29.402344 C 14.457031 28.304688 14.460938 28.25 14.539062 28 C 14.585938 27.851562 14.664062 27.65625 14.710938 27.5625 C 14.757812 27.46875 14.867188 27.292969 14.945312 27.171875 C 15.050781 27.015625 15.867188 26.179688 17.792969 24.25 L 20.492188 21.546875 C 20.402344 21.160156 20.359375 20.800781 20.339844 20.5 C 20.3125 20.085938 20.3125 19.855469 20.339844 19.5625 C 20.359375 19.347656 20.402344 19.046875 20.4375 18.890625 C 20.472656 18.734375 20.535156 18.496094 20.582031 18.359375 C 20.625 18.222656 20.707031 18.003906 20.757812 17.875 C 20.8125 17.746094 20.925781 17.519531 21.007812 17.367188 C 21.085938 17.214844 21.15625 17.089844 21.15625 17.085938 C 21.160156 17.082031 20.113281 16.464844 18.835938 15.71875 L 16.507812 14.359375 C 16.476562 13.898438 16.46875 12.195312 16.46875 10.28125 C 16.46875 8.367188 16.460938 6.691406 16.449219 6.5625 L 16.429688 6.328125 C 13.664062 4.695312 12.851562 4.226562 12.835938 4.238281 C 12.820312 4.242188 12.8125 8.25 12.8125 13.140625 C 12.8125 18.03125 12.820312 22.03125 12.835938 22.03125 C 12.851562 22.03125 13.042969 21.949219 13.265625 21.847656 C 13.488281 21.746094 14.042969 21.492188 14.5 21.285156 C 14.957031 21.070312 15.671875 20.742188 16.09375 20.546875 C 16.515625 20.351562 17.289062 19.992188 17.8125 19.753906 L 18.765625 19.316406 C 18.800781 21.214844 18.804688 21.835938 18.800781 21.921875 C 18.792969 22.007812 18.785156 22.320312 18.785156 22.609375 L 18.78125 23.140625 C 18.066406 23.488281 16.679688 24.164062 15.234375 24.875 C 13.789062 25.582031 11.90625 26.507812 11.046875 26.929688 C 10.1875 27.351562 9.441406 27.710938 9.390625 27.734375 L 9.296875 27.773438 C 9.257812 25.128906 9.25 19.34375 9.25 13.210938 L 9.25 2.0625 C 8.804688 1.804688 8.347656 1.539062 7.953125 1.3125 C 7.558594 1.082031 6.886719 0.695312 6.460938 0.445312 C 6.035156 0.199219 5.675781 0 5.660156 0 C 5.648438 0 5.625 1.101562 5.613281 2.445312 Z M 25.375 15.207031 C 25.332031 15.210938 25.199219 15.242188 25.078125 15.265625 C 24.960938 15.292969 24.753906 15.34375 24.625 15.378906 C 24.496094 15.414062 24.363281 15.457031 24.328125 15.472656 C 24.292969 15.484375 24.160156 15.539062 24.03125 15.597656 C 23.902344 15.648438 23.679688 15.765625 23.53125 15.851562 C 23.382812 15.941406 23.238281 16.035156 23.203125 16.066406 C 23.167969 16.097656 23.132812 16.125 23.117188 16.125 C 23.101562 16.125 23.027344 16.179688 22.949219 16.242188 C 22.871094 16.304688 22.699219 16.464844 22.566406 16.59375 C 22.433594 16.722656 22.242188 16.933594 22.140625 17.0625 C 22.039062 17.191406 21.890625 17.402344 21.808594 17.53125 C 21.730469 17.660156 21.617188 17.871094 21.554688 18 C 21.492188 18.128906 21.394531 18.382812 21.335938 18.5625 C 21.273438 18.742188 21.210938 18.960938 21.195312 19.046875 C 21.175781 19.132812 21.144531 19.320312 21.125 19.46875 C 21.101562 19.632812 21.09375 19.917969 21.101562 20.21875 C 21.113281 20.484375 21.132812 20.808594 21.152344 20.9375 C 21.171875 21.066406 21.230469 21.308594 21.28125 21.476562 L 21.375 21.78125 C 17.003906 26.152344 15.6875 27.476562 15.632812 27.546875 C 15.582031 27.617188 15.503906 27.734375 15.460938 27.8125 C 15.414062 27.890625 15.351562 28.03125 15.3125 28.125 C 15.257812 28.265625 15.238281 28.378906 15.226562 28.734375 C 15.210938 29.085938 15.222656 29.210938 15.265625 29.359375 C 15.292969 29.460938 15.355469 29.632812 15.40625 29.734375 C 15.457031 29.835938 15.570312 30.011719 15.65625 30.125 C 15.746094 30.238281 15.914062 30.398438 16.027344 30.484375 C 16.140625 30.570312 16.277344 30.664062 16.328125 30.695312 C 16.382812 30.722656 16.507812 30.777344 16.609375 30.820312 C 16.777344 30.882812 16.847656 30.890625 17.296875 30.890625 C 17.746094 30.890625 17.816406 30.882812 17.984375 30.820312 C 18.085938 30.777344 18.234375 30.710938 18.3125 30.664062 C 18.390625 30.621094 18.507812 30.542969 18.578125 30.492188 C 18.648438 30.4375 19.972656 29.121094 21.523438 27.570312 L 24.34375 24.75 C 24.839844 24.902344 25.074219 24.960938 25.1875 24.976562 C 25.300781 24.988281 25.59375 25.007812 25.84375 25.019531 C 26.132812 25.03125 26.410156 25.023438 26.609375 25 C 26.78125 24.976562 27.027344 24.933594 27.15625 24.902344 C 27.285156 24.871094 27.523438 24.800781 27.6875 24.742188 C 27.851562 24.679688 28.089844 24.582031 28.21875 24.519531 C 28.347656 24.453125 28.503906 24.371094 28.5625 24.335938 C 28.621094 24.300781 28.800781 24.175781 28.953125 24.058594 C 29.109375 23.945312 29.351562 23.734375 29.492188 23.589844 C 29.636719 23.445312 29.835938 23.222656 29.929688 23.09375 C 30.027344 22.964844 30.183594 22.734375 30.277344 22.578125 C 30.367188 22.421875 30.492188 22.179688 30.554688 22.03125 C 30.617188 21.882812 30.691406 21.675781 30.726562 21.5625 C 30.757812 21.449219 30.8125 21.242188 30.851562 21.09375 C 30.914062 20.855469 30.921875 20.75 30.921875 20.109375 C 30.921875 19.417969 30.917969 19.378906 30.832031 19.046875 C 30.78125 18.859375 30.726562 18.671875 30.707031 18.632812 C 30.6875 18.589844 30.601562 18.523438 30.515625 18.476562 C 30.367188 18.398438 30.351562 18.398438 30.21875 18.433594 C 30.09375 18.46875 29.9375 18.613281 28.8125 19.734375 C 28.117188 20.429688 27.507812 21.011719 27.460938 21.027344 C 27.40625 21.050781 27 21.0625 26.382812 21.0625 C 25.445312 21.0625 25.382812 21.058594 25.289062 21 C 25.234375 20.964844 25.160156 20.890625 25.125 20.835938 C 25.066406 20.742188 25.0625 20.679688 25.0625 19.726562 C 25.0625 19.050781 25.074219 18.695312 25.097656 18.648438 C 25.117188 18.609375 25.695312 18.007812 26.390625 17.3125 C 27.425781 16.273438 27.65625 16.023438 27.6875 15.921875 C 27.71875 15.820312 27.714844 15.773438 27.675781 15.671875 C 27.648438 15.601562 27.589844 15.511719 27.542969 15.46875 C 27.488281 15.414062 27.355469 15.363281 27.113281 15.300781 C 26.789062 15.214844 26.71875 15.210938 26.109375 15.199219 C 25.75 15.195312 25.417969 15.199219 25.375 15.207031 Z M 25.375 15.207031 "/></g></svg><h2>Browserless Debugger</h2></div><div class="group"><button id="download"><svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg></button> <button id="run-button"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 -5 24 30" height="20px" width="20px" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#fff" stroke-width="2" d="M3,22.0000002 L21,12 L3,2 L3,22.0000002 Z M5,19 L17.5999998,11.9999999 L5,5 L5,19 Z M7,16 L14.1999999,12 L7,8 L7,16 Z M9,13 L10.8,12 L9,11 L9,13 Z"></path></svg></button></div></header><main><ul id="side-nav"><input value="editor" type="radio" name="open-panel" id="editor-button-radio" class="active" title="Code Editor" checked="checked"><label for="editor-button-radio" id="editor-button"><svg viewBox="0 0 24 24" width="24" height="24" stroke="#ccc" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></label> <input value="sessions" type="radio" name="open-panel" id="sessions-button-radio" title="Session viewer"><label for="sessions-button-radio" id="sessions-button"><svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line></svg></label> <input value="settings" type="radio" name="open-panel" id="settings-button-radio" title="Settings"><label for="settings-button-radio" id="settings-button"><svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" class="css-i6dzq1"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></label></ul><div id="editor"><ol id="editor-tabs"></ol><div id="code"></div><div id="sessions"></div><div id="settings"></div></div><div id="resize-main" class="resizer-horizontal"></div><div id="runner"><div class="fixed-message"><code>Click the ► button to run your code.</code></div></div></main></body><script src="./tracker.js"></script></html>
@@ -0,0 +1 @@
1
+ let path=location.pathname;path.endsWith("index.html")&&(path=path.substring(0,path.length-10)),path.endsWith("/")||(path+="/");const newUrl=location.origin+path+location.search+location.hash;newUrl!==window.location.href&&window.history.pushState({},"",newUrl);
@@ -1 +1 @@
1
- const loadPostHog=()=>{var t,e,o,a,n,r;t=document,(e=window.posthog||[]).__SV||(window.posthog=e,e._i=[],e.init=function(s,i,g){function p(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(n=t.createElement("script")).type="text/javascript",n.async=!0,n.src=i.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(n,r);var c=e;for(void 0!==g?c=e[g]=[]:g="posthog",c.people=c.people||[],c.toString=function(t){var e="posthog";return"posthog"!==g&&(e+="."+g),t||(e+=" (stub)"),e},c.people.toString=function(){return c.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onSessionId".split(" "),a=0;a<o.length;a++)p(c,o[a]);e._i.push([s,i,g])},e.__SV=1),posthog.init("phc_XhHYc7RxsVmARgx0g7unvmaPqSdyYWenALBOK1ZjPQo",{api_host:"https://app.posthog.com"})},loadGTag=()=>{var t=document.createElement("script");t.src="https://www.googletagmanager.com/gtag/js?id=G-25NMGWY45L",t.onload=function(){function t(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],t("js",new Date),t("config","G-25NMGWY45L")},document.head.appendChild(t)},loadGtagManager=()=>{!function(t,e,o,a,n){t[a]=t[a]||[],t[a].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var r=e.getElementsByTagName(o)[0],s=e.createElement(o);s.async=!0,s.src="https://www.googletagmanager.com/gtm.js?id=GTM-M78W82C8",r.parentNode.insertBefore(s,r)}(window,document,"script","dataLayer")};"https:"===window.location.protocol&&"chrome.browserless.io"===window.location.host&&(loadPostHog(),loadGTag(),loadGtagManager());
1
+ const loadPostHog=()=>{var e,t,o,n,r,a;e=document,(t=window.posthog||[]).__SV||(window.posthog=t,t._i=[],t.init=function(s,i,c){function p(e,t){var o=t.split(".");2==o.length&&(e=e[o[0]],t=o[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}(r=e.createElement("script")).type="text/javascript",r.async=!0,r.src=i.api_host+"/static/array.js",(a=e.getElementsByTagName("script")[0]).parentNode.insertBefore(r,a);var l=t;for(void 0!==c?l=t[c]=[]:c="posthog",l.people=l.people||[],l.toString=function(e){var t="posthog";return"posthog"!==c&&(t+="."+c),e||(t+=" (stub)"),t},l.people.toString=function(){return l.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onSessionId".split(" "),n=0;n<o.length;n++)p(l,o[n]);t._i.push([s,i,c])},t.__SV=1),posthog.init("phc_XhHYc7RxsVmARgx0g7unvmaPqSdyYWenALBOK1ZjPQo",{api_host:"https://app.posthog.com"})},loadGTag=()=>{var e=document.createElement("script");e.src="https://www.googletagmanager.com/gtag/js?id=G-25NMGWY45L",e.onload=function(){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config","G-25NMGWY45L")},document.head.appendChild(e)},loadGtagManager=()=>{!function(e,t,o,n,r){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var a=t.getElementsByTagName(o)[0],s=t.createElement(o);s.async=!0,s.src="https://www.googletagmanager.com/gtm.js?id=GTM-M78W82C8",a.parentNode.insertBefore(s,a)}(window,document,"script","dataLayer")},loadAmplitude=async()=>{!function(){"use strict";!function(e,t){var o=e.amplitude||{_q:[],_iq:{}};if(o.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},r=function(e,t,o){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(o,0),resolve:n})}},a=function(e,t,o){e[t]=function(){if(o)return{promise:new Promise(r(e,t,Array.prototype.slice.call(arguments)))};!function(e,t,o){e._q.push({name:t,args:Array.prototype.slice.call(o,0)})}(e,t,Array.prototype.slice.call(arguments))}},s=function(e){for(var t=0;t<f.length;t++)a(e,f[t],!1);for(var o=0;o<h.length;o++)a(e,h[o],!0)};o.invoked=!0;var i=t.createElement("script");i.type="text/javascript",i.integrity="sha384-BWw9N39aN+4SdxZuwmRR0StXCLA+Bre4jR6bJt+pM1IqONNALC5rf25NkWMTyta5",i.crossOrigin="anonymous",i.async=!0,i.src="https://cdn.amplitude.com/libs/analytics-browser-2.9.3-min.js.gz",i.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var c=t.getElementsByTagName("script")[0];c.parentNode.insertBefore(i,c);for(var p=function(){return this._q=[],this},l=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],u=0;u<l.length;u++)n(p,l[u]);o.Identify=p;for(var d=function(){return this._q=[],this},g=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],m=0;m<g.length;m++)n(d,g[m]);o.Revenue=d;var f=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset","extendSession"],h=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];s(o),o.createInstance=function(e){return o._iq[e]={_q:[]},s(o._iq[e]),o._iq[e]},e.amplitude=o}}(window,document)}(),await amplitude.init("4a0e558f758d811ba8d4d3595f1b8e73",{defaultTracking:{pageViews:!1,formInteractions:!1}}),window.amplitude&&await window.amplitude.track("Debugger Page Visited")};"https:"===window.location.protocol&&"chrome.browserless.io"===window.location.host&&(loadPostHog(),loadGTag(),loadGtagManager(),loadAmplitude());