diff --git a/README.MD b/README.MD index 78ad019..a52863b 100644 --- a/README.MD +++ b/README.MD @@ -4,7 +4,7 @@ Restarting fresh A patch driven fork of uBlock Origin. -Upstream commit pin: `c3b0fd31f64bd7ffecdd282fb1208fe07aac3eb0` or `1.17.4` +Upstream commit pin: `0341a5e1f995ec44ba39ebf72480e7e40f27e717` or `1.17.5rc0+3` **Please submit issues to the [Nano Core issues tracker](https://github.com/NanoAdblocker/NanoCore/issues).** diff --git a/config.nano.js b/config.nano.js index d4ac22e..624f4a7 100644 --- a/config.nano.js +++ b/config.nano.js @@ -76,8 +76,6 @@ "./patches/30_0_link_resources.patch", - "./patches/90_0_micro_optimizations.patch", - /*****************************************************************/ ], diff --git a/patches/00_0_textarea_spacing.patch b/patches/00_0_textarea_spacing.patch index 238f2d0..030540b 100644 --- a/patches/00_0_textarea_spacing.patch +++ b/patches/00_0_textarea_spacing.patch @@ -1,5 +1,5 @@ diff --git a/src/css/common.css b/src/css/common.css -index a483215d..3683de3c 100644 +index c6499ef5..a09ae70a 100644 --- a/src/css/common.css +++ b/src/css/common.css @@ -25,6 +25,7 @@ code { diff --git a/patches/20_0_configuration_tweaks.patch b/patches/20_0_configuration_tweaks.patch index e949e29..92cfa68 100644 --- a/patches/20_0_configuration_tweaks.patch +++ b/patches/20_0_configuration_tweaks.patch @@ -1,8 +1,8 @@ diff --git a/src/js/assets.js b/src/js/assets.js -index b6821bbd..26bf4ada 100644 +index 23a12902..3d66f772 100644 --- a/src/js/assets.js +++ b/src/js/assets.js -@@ -285,7 +285,7 @@ var registerAssetSource = function(assetKey, dict) { +@@ -311,7 +311,7 @@ const registerAssetSource = function(assetKey, dict) { entry.contentURL = []; } if ( typeof entry.updateAfter !== 'number' ) { @@ -11,7 +11,7 @@ index b6821bbd..26bf4ada 100644 } if ( entry.submitter ) { entry.submitTime = Date.now(); // To detect stale entries -@@ -902,7 +902,7 @@ api.rmrf = function() { +@@ -898,7 +898,7 @@ api.rmrf = function() { // Asset updater area. var updaterStatus, updaterTimer, @@ -21,10 +21,10 @@ index b6821bbd..26bf4ada 100644 updaterUpdated = [], updaterFetched = new Set(), diff --git a/src/js/background.js b/src/js/background.js -index 17e5b034..88d5542e 100644 +index f1d0e741..6f66b049 100644 --- a/src/js/background.js +++ b/src/js/background.js -@@ -40,8 +40,8 @@ const µBlock = (function() { // jshint ignore:line +@@ -40,15 +40,15 @@ const µBlock = (function() { // jshint ignore:line const hiddenSettingsDefault = { assetFetchTimeout: 30, @@ -32,10 +32,9 @@ index 17e5b034..88d5542e 100644 - autoUpdatePeriod: 7, + autoUpdateAssetFetchPeriod: 300, + autoUpdatePeriod: 4, - benchmarkingPane: false, cacheStorageCompression: true, cacheControlForFirefox1376932: 'no-cache, no-store, must-revalidate', -@@ -49,7 +49,7 @@ const µBlock = (function() { // jshint ignore:line + debugScriptlets: false, disableWebAssembly: false, ignoreRedirectFilters: false, ignoreScriptInjectFilters: false, @@ -44,7 +43,7 @@ index 17e5b034..88d5542e 100644 nanoIgnoreThirdPartyWhitelist: false, nanoMakeThirdPartyFiltersPrivileged: false, nanoMakeUserFiltersPrivileged: false, -@@ -65,6 +65,7 @@ const µBlock = (function() { // jshint ignore:line +@@ -64,6 +64,7 @@ const µBlock = (function() { // jshint ignore:line 'chrome-extension-scheme', 'chrome-scheme', 'moz-extension-scheme', @@ -53,10 +52,10 @@ index 17e5b034..88d5542e 100644 'vivaldi-scheme', 'wyciwyg-scheme', // Firefox's "What-You-Cache-Is-What-You-Get" diff --git a/src/js/start.js b/src/js/start.js -index 7307a494..1ed193cc 100644 +index 1a99a0fb..aa382f03 100644 --- a/src/js/start.js +++ b/src/js/start.js -@@ -223,13 +223,6 @@ var onUserSettingsReady = function(fetched) { +@@ -231,13 +231,6 @@ var onUserSettingsReady = function(fetched) { µb.sessionURLFiltering.assign(µb.permanentURLFiltering); µb.permanentSwitches.fromString(fetched.hostnameSwitchesString); µb.sessionSwitches.assign(µb.permanentSwitches); @@ -70,7 +69,7 @@ index 7307a494..1ed193cc 100644 }; /******************************************************************************/ -@@ -316,6 +309,7 @@ var onSelectedFilterListsLoaded = function() { +@@ -324,6 +317,7 @@ var onSelectedFilterListsLoaded = function() { ].join('\n'), 'urlFilteringString': '', 'hostnameSwitchesString': [ @@ -79,10 +78,10 @@ index 7307a494..1ed193cc 100644 'no-scripting: behind-the-scene false' ].join('\n'), diff --git a/src/js/storage.js b/src/js/storage.js -index acaa3e88..a0b69e06 100644 +index f48ad6e0..edfbf6ef 100644 --- a/src/js/storage.js +++ b/src/js/storage.js -@@ -1272,7 +1272,7 @@ +@@ -1293,7 +1293,7 @@ next = 0; var µb = µBlock; µb.assets.updateStart({ @@ -91,7 +90,7 @@ index acaa3e88..a0b69e06 100644 }); }, updateDelay); }; -@@ -1367,7 +1367,7 @@ +@@ -1391,7 +1391,7 @@ this.loadFilterLists(); } if ( this.userSettings.autoUpdate ) { diff --git a/patches/20_1_header_parsing.patch b/patches/20_1_header_parsing.patch index c76bd32..f607445 100644 --- a/patches/20_1_header_parsing.patch +++ b/patches/20_1_header_parsing.patch @@ -1,8 +1,8 @@ diff --git a/src/js/storage.js b/src/js/storage.js -index a0b69e06..06eb54f6 100644 +index edfbf6ef..17c14f2f 100644 --- a/src/js/storage.js +++ b/src/js/storage.js -@@ -764,15 +764,33 @@ +@@ -775,15 +775,33 @@ } // Extract update frequency information let matches = head.match(/(?:^|\n)(?:!|# )[\t ]*Expires[\t ]*:[\t ]*(\d+)[\t ]*(h)?/i); diff --git a/patches/20_3_reset_hard.patch b/patches/20_3_reset_hard.patch index c09b7d4..ff47019 100644 --- a/patches/20_3_reset_hard.patch +++ b/patches/20_3_reset_hard.patch @@ -1,8 +1,8 @@ diff --git a/src/js/messaging.js b/src/js/messaging.js -index bbc2212c..2becceb7 100644 +index 3acd1d88..5c8ac0ab 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js -@@ -846,11 +846,8 @@ var restoreUserData = function(request) { +@@ -851,11 +851,8 @@ var restoreUserData = function(request) { vAPI.localStorage.removeItem('immediateHiddenSettings'); }; @@ -15,7 +15,7 @@ index bbc2212c..2becceb7 100644 let countdown = ( ) => { count -= 1; if ( count === 0 ) { -@@ -859,8 +856,7 @@ var resetUserData = function() { +@@ -864,8 +861,7 @@ var resetUserData = function() { }; µb.cacheStorage.clear(countdown); // 1 vAPI.storage.clear(countdown); // 2 diff --git a/patches/20_4_log_script_snippet_errors.patch b/patches/20_4_log_script_snippet_errors.patch index 8ad62ee..8ee8eb7 100644 --- a/patches/20_4_log_script_snippet_errors.patch +++ b/patches/20_4_log_script_snippet_errors.patch @@ -1,8 +1,8 @@ diff --git a/src/js/scriptlet-filtering.js b/src/js/scriptlet-filtering.js -index a644d619..ca16cd0f 100644 +index 86c31dd7..c4abf10d 100644 --- a/src/js/scriptlet-filtering.js +++ b/src/js/scriptlet-filtering.js -@@ -187,7 +187,9 @@ +@@ -195,7 +195,9 @@ content = 'try {\n' + content.replace('{{nano}}', '') + '\n' + diff --git a/patches/20_6_warn_unsaved.patch b/patches/20_6_warn_unsaved.patch index bdd9d43..8208f66 100644 --- a/patches/20_6_warn_unsaved.patch +++ b/patches/20_6_warn_unsaved.patch @@ -27,7 +27,7 @@ index 42ea241f..f81090b9 100644 uDom('#buttonPurgeAll').toggleClass( 'disabled', diff --git a/src/js/dashboard.js b/src/js/dashboard.js -index f80e7724..ca676b2b 100644 +index d038c5d0..5ec05c8b 100644 --- a/src/js/dashboard.js +++ b/src/js/dashboard.js @@ -62,7 +62,10 @@ let onTabClickHandler = function(e) { @@ -42,7 +42,7 @@ index f80e7724..ca676b2b 100644 window.location.replace(url); loadDashboardPanel(); } -@@ -85,4 +88,32 @@ loadDashboardPanel(); +@@ -81,4 +84,32 @@ loadDashboardPanel(); /******************************************************************************/ @@ -76,7 +76,7 @@ index f80e7724..ca676b2b 100644 + })(); diff --git a/src/js/dyna-rules.js b/src/js/dyna-rules.js -index 8ffe536b..09670b26 100644 +index 5e36ce91..cf4fc938 100644 --- a/src/js/dyna-rules.js +++ b/src/js/dyna-rules.js @@ -25,6 +25,10 @@ @@ -90,7 +90,7 @@ index 8ffe536b..09670b26 100644 (function() { /******************************************************************************/ -@@ -348,6 +352,7 @@ var onTextChanged = (function() { +@@ -385,6 +389,7 @@ const onTextChanged = (function() { input.setAttribute('disabled', ''); CodeMirror.commands.save = editSaveHandler; } diff --git a/patches/90_0_micro_optimizations.patch b/patches/90_0_micro_optimizations.patch deleted file mode 100644 index de87607..0000000 --- a/patches/90_0_micro_optimizations.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/src/js/assets.js b/src/js/assets.js -index 26bf4ada..aeab4f7c 100644 ---- a/src/js/assets.js -+++ b/src/js/assets.js -@@ -368,8 +368,7 @@ var getAssetSourceRegistry = function(callback) { - var registryReady = function() { - var callers = assetSourceRegistryStatus; - assetSourceRegistryStatus = 'ready'; -- var fn; -- while ( (fn = callers.shift()) ) { -+ for ( var fn of callers ) { - fn(assetSourceRegistry); - } - }; -@@ -439,8 +438,7 @@ var getAssetCacheRegistry = function(callback) { - var registryReady = function() { - var callers = assetCacheRegistryStatus; - assetCacheRegistryStatus = 'ready'; -- var fn; -- while ( (fn = callers.shift()) ) { -+ for ( var fn of callers ) { - fn(assetCacheRegistry); - } - }; -diff --git a/src/js/redirect-engine.js b/src/js/redirect-engine.js -index 0dfb566b..ce5a0e75 100644 ---- a/src/js/redirect-engine.js -+++ b/src/js/redirect-engine.js -@@ -347,8 +347,8 @@ RedirectEngine.prototype.compileRuleFromStaticFilter = function(line) { - return; - } - -- // Need one single type -- not negated. -- if ( type === undefined || type.startsWith('~') ) { -+ // Need one single supported type. -+ if ( type === undefined ) { - nano.flintw('nano_r_no_supported_type'); - return; - } -diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js -index c1ed276f..f2d6d151 100644 ---- a/src/js/static-net-filtering.js -+++ b/src/js/static-net-filtering.js -@@ -2180,12 +2180,7 @@ FilterContainer.prototype.fromSelfie = function(selfie) { - FilterContainer.prototype.compile = function(raw, writer) { - // ORDER OF TESTS IS IMPORTANT! - -- // Ignore empty lines -- var s = raw.trim(); -- if ( s.length === 0 ) { -- return false; -- } -- -+ var s = raw; - var parsed = this.filterParser.parse(s); - - // Ignore element-hiding filters -diff --git a/src/js/storage.js b/src/js/storage.js -index 06eb54f6..6f6fb232 100644 ---- a/src/js/storage.js -+++ b/src/js/storage.js -@@ -674,7 +674,7 @@ - - // We need to build a complete list of assets to pull first: this is - // because it *may* happens that some load operations are synchronous: -- // This happens for assets which do not exist, ot assets with no -+ // This happens for assets which do not exist, or assets with no - // content. - var toLoad = []; - for ( var assetKey in lists ) { diff --git a/patches/README.MD b/patches/README.MD index d36e59f..0decacc 100644 --- a/patches/README.MD +++ b/patches/README.MD @@ -39,7 +39,3 @@ category because a pull request is opened upstream. ## Group `30`: User Interface Changes `30_0_link_resources.patch`: Link useful resources in the dashboard. - -## Group `90`: Other Changes - -`90_0_micro_optimizations.patch`: Minor optimizations and typo fixes. diff --git a/patches/integration/00_1_version_parsing.patch b/patches/integration/00_1_version_parsing.patch index 639923f..4da8307 100644 --- a/patches/integration/00_1_version_parsing.patch +++ b/patches/integration/00_1_version_parsing.patch @@ -1,5 +1,5 @@ diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js -index c556ee59..0ae63186 100644 +index 1df622c5..2d8f76c9 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -66,16 +66,9 @@ var noopFunc = function(){}; diff --git a/patches/integration/00_2_vapi_icon.patch b/patches/integration/00_2_vapi_icon.patch index c275f35..b206d6d 100644 --- a/patches/integration/00_2_vapi_icon.patch +++ b/patches/integration/00_2_vapi_icon.patch @@ -1,8 +1,8 @@ diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js -index 0ae63186..d344fdca 100644 +index 2d8f76c9..2696807d 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js -@@ -647,10 +647,10 @@ vAPI.setIcon = (function() { +@@ -663,10 +663,10 @@ vAPI.setIcon = (function() { ' ({badge})'; const icons = [ { diff --git a/patches/integration/00_3_favicon.patch b/patches/integration/00_3_favicon.patch index 28b1e7f..85e10e3 100644 --- a/patches/integration/00_3_favicon.patch +++ b/patches/integration/00_3_favicon.patch @@ -1,5 +1,5 @@ diff --git a/src/asset-viewer.html b/src/asset-viewer.html -index fbcadf5e..d2809138 100644 +index 8d02d2e1..5459131a 100644 --- a/src/asset-viewer.html +++ b/src/asset-viewer.html @@ -8,7 +8,7 @@ @@ -11,8 +11,31 @@ index fbcadf5e..d2809138 100644