@browserless.io/browserless 2.12.0-beta-3 → 2.12.0-beta-4
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/browsers/chromium.cdp.d.ts +1 -1
- package/build/browsers/chromium.cdp.js +2 -2
- package/build/browsers/chromium.playwright.d.ts +1 -1
- package/build/browsers/chromium.playwright.js +2 -2
- package/build/browsers/firefox.playwright.d.ts +1 -1
- package/build/browsers/firefox.playwright.js +2 -2
- package/build/browsers/index.d.ts +3 -2
- package/build/browsers/index.js +36 -17
- package/build/browsers/webkit.playwright.d.ts +1 -1
- package/build/browsers/webkit.playwright.js +4 -4
- package/build/routes/chrome/http/pdf.post.body.json +8 -8
- package/build/routes/chrome/http/scrape.post.body.json +8 -8
- package/build/routes/chrome/http/screenshot.post.body.json +8 -8
- package/build/routes/chromium/http/content.post.body.json +8 -8
- package/build/routes/chromium/http/pdf.post.body.json +8 -8
- package/build/routes/chromium/http/scrape.post.body.json +8 -8
- package/build/types.d.ts +1 -1
- package/extensions/ublock/_locales/eu/messages.json +4 -4
- package/extensions/ublock/_locales/hi/messages.json +5 -5
- package/extensions/ublock/_locales/kn/messages.json +11 -11
- package/extensions/ublock/_locales/nb/messages.json +2 -2
- package/extensions/ublock/_locales/no/messages.json +2 -2
- package/extensions/ublock/_locales/ro/messages.json +1 -1
- package/extensions/ublock/_locales/sv/messages.json +1 -1
- package/extensions/ublock/_locales/zh_CN/messages.json +2 -2
- package/extensions/ublock/assets/assets.json +3 -8
- package/extensions/ublock/assets/resources/scriptlets.js +128 -31
- package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +4870 -3560
- package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +662 -173
- package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +10 -42
- package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +241 -80
- package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +2093 -1224
- package/extensions/ublock/assets/ublock/badlists.txt +2 -0
- package/extensions/ublock/assets/ublock/badware.min.txt +408 -287
- package/extensions/ublock/assets/ublock/filters.min.txt +947 -645
- package/extensions/ublock/assets/ublock/privacy.min.txt +43 -8
- package/extensions/ublock/assets/ublock/quick-fixes.min.txt +55 -93
- package/extensions/ublock/assets/ublock/unbreak.min.txt +52 -19
- package/extensions/ublock/css/1p-filters.css +2 -0
- package/extensions/ublock/css/codemirror.css +2 -2
- package/extensions/ublock/css/dashboard.css +2 -5
- package/extensions/ublock/css/epicker-ui.css +3 -3
- package/extensions/ublock/css/fa-icons.css +3 -0
- package/extensions/ublock/css/logger-ui-inspector.css +1 -0
- package/extensions/ublock/css/logger-ui.css +44 -32
- package/extensions/ublock/img/fontawesome/fontawesome-defs.svg +1 -0
- package/extensions/ublock/js/3p-filters.js +4 -5
- package/extensions/ublock/js/biditrie.js +16 -11
- package/extensions/ublock/js/cachestorage.js +37 -37
- package/extensions/ublock/js/contentscript-extra.js +0 -2
- package/extensions/ublock/js/contentscript.js +1 -6
- package/extensions/ublock/js/epicker-ui.js +28 -36
- package/extensions/ublock/js/fa-icons.js +1 -0
- package/extensions/ublock/js/hntrie.js +19 -13
- package/extensions/ublock/js/logger-ui-inspector.js +6 -13
- package/extensions/ublock/js/logger-ui.js +264 -264
- package/extensions/ublock/js/s14e-serializer.js +267 -264
- package/extensions/ublock/js/scriptlet-filtering.js +12 -18
- package/extensions/ublock/js/scriptlets/dom-inspector.js +1 -5
- package/extensions/ublock/js/scriptlets/epicker.js +53 -59
- package/extensions/ublock/js/start.js +0 -8
- package/extensions/ublock/js/storage.js +2 -9
- package/extensions/ublock/js/vapi-background.js +19 -20
- package/extensions/ublock/js/vapi-common.js +2 -7
- package/extensions/ublock/js/vapi.js +0 -4
- package/extensions/ublock/js/webext.js +23 -15
- package/extensions/ublock/logger-ui.html +24 -15
- package/extensions/ublock/manifest.json +2 -3
- package/package.json +2 -2
- package/src/browsers/chromium.cdp.ts +2 -2
- package/src/browsers/chromium.playwright.ts +2 -2
- package/src/browsers/firefox.playwright.ts +2 -3
- package/src/browsers/index.ts +49 -21
- package/src/browsers/webkit.playwright.ts +4 -4
- package/src/routes/chrome/tests/websocket.spec.ts +2 -2
- package/src/routes/chromium/tests/websocket.spec.ts +2 -2
- package/src/routes/firefox/tests/websocket.spec.ts +2 -4
- package/src/routes/webkit/tests/websocket.spec.ts +2 -3
- package/src/types.ts +1 -1
- package/src/utils.ts +1 -1
- package/static/docs/swagger.json +1 -1
- package/static/docs/swagger.min.json +1 -1
|
@@ -19,10 +19,6 @@
|
|
|
19
19
|
Home: https://github.com/gorhill/uBlock
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
/* globals WebAssembly */
|
|
23
|
-
|
|
24
|
-
'use strict';
|
|
25
|
-
|
|
26
22
|
/*******************************************************************************
|
|
27
23
|
|
|
28
24
|
The original prototype was to develop an idea I had about using jump indices
|
|
@@ -115,7 +111,7 @@
|
|
|
115
111
|
*/
|
|
116
112
|
|
|
117
113
|
const PAGE_SIZE = 65536;
|
|
118
|
-
|
|
114
|
+
// i32 / i8
|
|
119
115
|
const TRIE0_SLOT = 256 >>> 2; // 64 / 256
|
|
120
116
|
const TRIE1_SLOT = TRIE0_SLOT + 1; // 65 / 260
|
|
121
117
|
const CHAR0_SLOT = TRIE0_SLOT + 2; // 66 / 264
|
|
@@ -124,6 +120,16 @@ const TRIE0_START = TRIE0_SLOT + 4 << 2; // 272
|
|
|
124
120
|
|
|
125
121
|
const roundToPageSize = v => (v + PAGE_SIZE-1) & ~(PAGE_SIZE-1);
|
|
126
122
|
|
|
123
|
+
// http://www.cse.yorku.ca/~oz/hash.html#djb2
|
|
124
|
+
const i32Checksum = (buf32) => {
|
|
125
|
+
const n = buf32.length;
|
|
126
|
+
let hash = 177573 ^ n;
|
|
127
|
+
for ( let i = 0; i < n; i++ ) {
|
|
128
|
+
hash = (hash << 5) + hash ^ buf32[i];
|
|
129
|
+
}
|
|
130
|
+
return hash;
|
|
131
|
+
};
|
|
132
|
+
|
|
127
133
|
class HNTrieContainer {
|
|
128
134
|
|
|
129
135
|
constructor() {
|
|
@@ -446,16 +452,16 @@ class HNTrieContainer {
|
|
|
446
452
|
}
|
|
447
453
|
|
|
448
454
|
toSelfie() {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
this.buf32[CHAR1_SLOT] + 3 >>> 2
|
|
452
|
-
);
|
|
455
|
+
const buf32 = this.buf32.subarray(0, this.buf32[CHAR1_SLOT] + 3 >>> 2);
|
|
456
|
+
return { buf32, checksum: i32Checksum(buf32) };
|
|
453
457
|
}
|
|
454
458
|
|
|
455
459
|
fromSelfie(selfie) {
|
|
456
|
-
if ( selfie instanceof
|
|
460
|
+
if ( selfie instanceof Object === false ) { return false; }
|
|
461
|
+
if ( selfie.buf32 instanceof Uint32Array === false ) { return false; }
|
|
462
|
+
if ( selfie.checksum !== i32Checksum(selfie.buf32) ) { return false; }
|
|
457
463
|
this.needle = '';
|
|
458
|
-
let byteLength = selfie.length << 2;
|
|
464
|
+
let byteLength = selfie.buf32.length << 2;
|
|
459
465
|
if ( byteLength === 0 ) { return false; }
|
|
460
466
|
byteLength = roundToPageSize(byteLength);
|
|
461
467
|
if ( this.wasmMemory !== null ) {
|
|
@@ -466,9 +472,9 @@ class HNTrieContainer {
|
|
|
466
472
|
this.buf = new Uint8Array(this.wasmMemory.buffer);
|
|
467
473
|
this.buf32 = new Uint32Array(this.buf.buffer);
|
|
468
474
|
}
|
|
469
|
-
this.buf32.set(selfie);
|
|
475
|
+
this.buf32.set(selfie.buf32);
|
|
470
476
|
} else {
|
|
471
|
-
this.buf32 = selfie;
|
|
477
|
+
this.buf32 = selfie.buf32;
|
|
472
478
|
this.buf = new Uint8Array(this.buf32.buffer);
|
|
473
479
|
}
|
|
474
480
|
// https://github.com/uBlockOrigin/uBlock-issues/issues/2925
|
|
@@ -19,10 +19,6 @@
|
|
|
19
19
|
Home: https://github.com/gorhill/uBlock
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
/* globals browser */
|
|
23
|
-
|
|
24
|
-
'use strict';
|
|
25
|
-
|
|
26
22
|
import { dom, qs$, qsa$ } from './dom.js';
|
|
27
23
|
|
|
28
24
|
/******************************************************************************/
|
|
@@ -38,7 +34,6 @@ const domTree = qs$('#domTree');
|
|
|
38
34
|
const filterToIdMap = new Map();
|
|
39
35
|
|
|
40
36
|
let inspectedTabId = 0;
|
|
41
|
-
let inspectedURL = '';
|
|
42
37
|
let inspectedHostname = '';
|
|
43
38
|
let uidGenerator = 1;
|
|
44
39
|
|
|
@@ -112,7 +107,6 @@ const contentInspectorChannel = (( ) => {
|
|
|
112
107
|
|
|
113
108
|
const onContentMessage = msg => {
|
|
114
109
|
if ( msg.what === 'domLayoutFull' ) {
|
|
115
|
-
inspectedURL = msg.url;
|
|
116
110
|
inspectedHostname = msg.hostname;
|
|
117
111
|
renderDOMFull(msg);
|
|
118
112
|
} else if ( msg.what === 'domLayoutIncremental' ) {
|
|
@@ -661,9 +655,9 @@ const revert = ( ) => {
|
|
|
661
655
|
const toggleOn = ( ) => {
|
|
662
656
|
dom.cl.add('#inspectors', 'dom');
|
|
663
657
|
window.addEventListener('beforeunload', toggleOff);
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
658
|
+
dom.on(document, 'tabIdChanged', onTabIdChanged);
|
|
659
|
+
dom.on(domTree, 'click', onClicked, true);
|
|
660
|
+
dom.on(domTree, 'mouseover', onMouseOver, true);
|
|
667
661
|
dom.on('#domInspector .vExpandToggler', 'click', toggleVExpandView);
|
|
668
662
|
dom.on('#domInspector .vCompactToggler', 'click', toggleVCompactView);
|
|
669
663
|
dom.on('#domInspector .hCompactToggler', 'click', toggleHCompactView);
|
|
@@ -680,9 +674,9 @@ const toggleOff = ( ) => {
|
|
|
680
674
|
dom.cl.remove('#inspectors', 'dom');
|
|
681
675
|
shutdownInspector();
|
|
682
676
|
window.removeEventListener('beforeunload', toggleOff);
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
677
|
+
dom.off(document, 'tabIdChanged', onTabIdChanged);
|
|
678
|
+
dom.off(domTree, 'click', onClicked, true);
|
|
679
|
+
dom.off(domTree, 'mouseover', onMouseOver, true);
|
|
686
680
|
dom.off('#domInspector .vExpandToggler', 'click', toggleVExpandView);
|
|
687
681
|
dom.off('#domInspector .vCompactToggler', 'click', toggleVCompactView);
|
|
688
682
|
dom.off('#domInspector .hCompactToggler', 'click', toggleHCompactView);
|
|
@@ -700,7 +694,6 @@ const toggle = ( ) => {
|
|
|
700
694
|
} else {
|
|
701
695
|
toggleOff();
|
|
702
696
|
}
|
|
703
|
-
logger.resize();
|
|
704
697
|
};
|
|
705
698
|
|
|
706
699
|
dom.on(showdomButton, 'click', toggle);
|