From f392d09a13640cd41fee091e6329421c36eaf63f Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 26 Jul 2021 08:34:32 -0400 Subject: [PATCH 1/6] Fix broken the compiling of generic cosmetic exception filters Related issue: - https://github.com/uBlockOrigin/uAssets/pull/9637 Regression from - https://github.com/gorhill/uBlock/commit/c25938f --- src/js/cosmetic-filtering.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index f0d045475..b3a4f05dd 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -369,7 +369,6 @@ FilterContainer.prototype.compile = function(parser, writer) { /******************************************************************************/ FilterContainer.prototype.compileGenericSelector = function(parser, writer) { - writer.select(µb.compiledCosmeticSection + COMPILED_GENERIC_SECTION); if ( parser.isException() ) { this.compileGenericUnhideSelector(parser, writer); } else { @@ -391,8 +390,11 @@ FilterContainer.prototype.compileGenericHideSelector = function( type: 'error', text: `Invalid generic cosmetic filter in ${who}: ${raw}` }); + return; } + writer.select(µb.compiledCosmeticSection + COMPILED_GENERIC_SECTION); + const type = compiled.charCodeAt(0); let key; @@ -494,6 +496,8 @@ FilterContainer.prototype.compileGenericUnhideSelector = function( return; } + writer.select(µb.compiledCosmeticSection + COMPILED_SPECIFIC_SECTION); + // https://github.com/chrisaljoudi/uBlock/issues/497 // All generic exception filters are stored as hostname-based filter // whereas the hostname is the empty string (which matches all @@ -511,7 +515,6 @@ FilterContainer.prototype.compileSpecificSelector = function( not, writer ) { - writer.select(µb.compiledCosmeticSection + COMPILED_SPECIFIC_SECTION); const { raw, compiled, exception } = parser.result; if ( compiled === undefined ) { const who = writer.properties.get('assetKey') || '?'; @@ -523,6 +526,8 @@ FilterContainer.prototype.compileSpecificSelector = function( return; } + writer.select(µb.compiledCosmeticSection + COMPILED_SPECIFIC_SECTION); + // https://github.com/chrisaljoudi/uBlock/issues/145 let unhide = exception ? 1 : 0; if ( not ) { unhide ^= 1; } From 3ba1fe05ebe57f9943829647db1b4bba35831e97 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 26 Jul 2021 08:36:00 -0400 Subject: [PATCH 2/6] New revision for dev build --- dist/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/version b/dist/version index 29ae45efb..e56539b5d 100644 --- a/dist/version +++ b/dist/version @@ -1 +1 @@ -1.37.1.1 +1.37.1.2 From 193cbac43e9ffce24eb14bbff7945337d20585c7 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 26 Jul 2021 08:40:46 -0400 Subject: [PATCH 3/6] Make Firefox dev build auto-update --- dist/firefox/updates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/firefox/updates.json b/dist/firefox/updates.json index d23a8da59..63a7f9422 100644 --- a/dist/firefox/updates.json +++ b/dist/firefox/updates.json @@ -3,9 +3,9 @@ "uBlock0@raymondhill.net": { "updates": [ { - "version": "1.37.1.1", + "version": "1.37.1.2", "browser_specific_settings": { "gecko": { "strict_min_version": "57" } }, - "update_link": "https://github.com/gorhill/uBlock/releases/download/1.37.1b1/uBlock0_1.37.1b1.firefox.signed.xpi" + "update_link": "https://github.com/gorhill/uBlock/releases/download/1.37.1b2/uBlock0_1.37.1b2.firefox.signed.xpi" } ] } From ee0b2c2fa46897b2d440b02e51305f45f0434291 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 28 Jul 2021 12:45:03 -0400 Subject: [PATCH 4/6] Do not truncate datalayer Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1671 Regression from: - https://github.com/gorhill/uBlock/commit/0dbe581c5bd26b0200e2879c0ffbdc519d7822ee --- src/web_accessible_resources/google-analytics_analytics.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/web_accessible_resources/google-analytics_analytics.js b/src/web_accessible_resources/google-analytics_analytics.js index 2875e1d54..6301ba923 100644 --- a/src/web_accessible_resources/google-analytics_analytics.js +++ b/src/web_accessible_resources/google-analytics_analytics.js @@ -86,7 +86,6 @@ if ( Array.isArray(dl) ) { dl.push = item => doCallback(item); const q = dl.slice(); - dl.length = 0; for ( const item of q ) { doCallback(item); } From 2f53a1a11ed9f3375bffe6a620c43e75e9bf434b Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 28 Jul 2021 13:07:01 -0400 Subject: [PATCH 5/6] New revision for dev build --- dist/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/version b/dist/version index e56539b5d..aa05b47e9 100644 --- a/dist/version +++ b/dist/version @@ -1 +1 @@ -1.37.1.2 +1.37.3.0 From 4612bfdbac7cb7116a10827aa9baa5d6f4b8681b Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 28 Jul 2021 13:11:09 -0400 Subject: [PATCH 6/6] Make Firefox dev build auto-update --- dist/firefox/updates.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/firefox/updates.json b/dist/firefox/updates.json index 63a7f9422..17a897d4f 100644 --- a/dist/firefox/updates.json +++ b/dist/firefox/updates.json @@ -3,9 +3,9 @@ "uBlock0@raymondhill.net": { "updates": [ { - "version": "1.37.1.2", + "version": "1.37.3.0", "browser_specific_settings": { "gecko": { "strict_min_version": "57" } }, - "update_link": "https://github.com/gorhill/uBlock/releases/download/1.37.1b2/uBlock0_1.37.1b2.firefox.signed.xpi" + "update_link": "https://github.com/gorhill/uBlock/releases/download/1.37.3b0/uBlock0_1.37.3b0.firefox.signed.xpi" } ] }