From c237f68d7c672adb74dbe96ef76fce8f15b378d1 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 17 Sep 2015 11:06:54 -0400 Subject: added inspiringsweater.xyz --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 74b777a..b0e53c2 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 6f506c670bd425f4743c3056d5a51d83 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -1fcf43b9a244944394d30421e60fda83 assets/ublock/filters.txt +94d5ec62289f8341c128c3431dd961ad assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 35578b5..e09b986 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -125,3 +125,7 @@ www.washingtonpost.com##.jqmOverlay # https://www.reddit.com/r/techsupport/comments/3kyd0m/sponsored_content_ads_that_only_show_up_with/ explosm.net##.inner-wrap > .row > .columns.large-4.medium-12.small-12 explosm.net##.inner-wrap > .row > .columns.large-8.medium-12 > hr + div:not(.row) + +# http://www.extremetech.com/mobile/214358-ad-blocking-for-the-masses-part-two-adblock-browser +# "anyone else trying it on ET find that one ziffdavis.com ad bypasses ublock0 even though it's in the default lists for block" +||inspiringsweater.xyz^ -- cgit v1.1 From 0cc43a7682d84ec89df4eccef51756e4bf4f9554 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 18 Sep 2015 00:21:53 -0400 Subject: facebook.com issue: https://www.reddit.com/r/facebook/comments/3ld5gn/ive_discovered_that_i_cant_access_facebook/ --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index b0e53c2..d600774 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 6f506c670bd425f4743c3056d5a51d83 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -94d5ec62289f8341c128c3431dd961ad assets/ublock/filters.txt +71693bd9912182540d8febab84d93bee assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index e09b986..a5c6e28 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -129,3 +129,7 @@ explosm.net##.inner-wrap > .row > .columns.large-8.medium-12 > hr + div:not(.row # http://www.extremetech.com/mobile/214358-ad-blocking-for-the-masses-part-two-adblock-browser # "anyone else trying it on ET find that one ziffdavis.com ad bypasses ublock0 even though it's in the default lists for block" ||inspiringsweater.xyz^ + +# https://www.reddit.com/r/facebook/comments/3ld5gn/ive_discovered_that_i_cant_access_facebook/ +# Until all users have latest EasyList +@@RPNcr3s-aD2.js$script,domain=facebook.com -- cgit v1.1 From 9d6f14e47e1c5889b3282958bee9b2a591096858 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 18 Sep 2015 08:40:50 -0400 Subject: added ||deservedlimp.xyz^ (extremetech.com) --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index d600774..f06048e 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 6f506c670bd425f4743c3056d5a51d83 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -71693bd9912182540d8febab84d93bee assets/ublock/filters.txt +10b247aa43c9bd968d900e5c3c6fce99 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index a5c6e28..e105d4d 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -129,6 +129,7 @@ explosm.net##.inner-wrap > .row > .columns.large-8.medium-12 > hr + div:not(.row # http://www.extremetech.com/mobile/214358-ad-blocking-for-the-masses-part-two-adblock-browser # "anyone else trying it on ET find that one ziffdavis.com ad bypasses ublock0 even though it's in the default lists for block" ||inspiringsweater.xyz^ +||deservedlimp.xyz^ # https://www.reddit.com/r/facebook/comments/3ld5gn/ive_discovered_that_i_cant_access_facebook/ # Until all users have latest EasyList -- cgit v1.1 From 6eecfaeecad5e6a43f84d838fc6338691c9e52eb Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 19 Sep 2015 09:39:41 -0400 Subject: washingtonpost.com --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index f06048e..8e4e079 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 6f506c670bd425f4743c3056d5a51d83 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -10b247aa43c9bd968d900e5c3c6fce99 assets/ublock/filters.txt +1961a4e0735d5dae6364a2e2c7f7c0ac assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index e105d4d..706286a 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -118,7 +118,7 @@ speedtest.net###swiffycontainer canvas ink361.com##.getridofAdsBlock[href^="javascript:"] # washingtonpost.com -||js.washingtonpost.com/wpost2/js/combo$script,first-party +||js.washingtonpost.com/wpost*/js/combo$script,first-party www.washingtonpost.com###drawbridge-signup-overlay www.washingtonpost.com##.jqmOverlay -- cgit v1.1 From 78c9f02c8089ecf4d717de3d57cd7fbd41a20116 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 19 Sep 2015 13:47:40 -0400 Subject: updated checksums --- assets/checksums.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 8e4e079..6ba2de9 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 6f506c670bd425f4743c3056d5a51d83 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -1961a4e0735d5dae6364a2e2c7f7c0ac assets/ublock/filters.txt +231c4b0325c8a908826df70488521849 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json -- cgit v1.1 From b0f62696b16514b063c6a791aa0aefa21042a07e Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 22 Sep 2015 09:59:49 -0400 Subject: this addresses #731 --- dist/description/description-en.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dist/description/description-en.txt b/dist/description/description-en.txt index 8ce4f1d..35c9c28 100644 --- a/dist/description/description-en.txt +++ b/dist/description/description-en.txt @@ -24,26 +24,28 @@ More lists are available for you to select if you wish: - Spam404 - And many others -Of course, the more filters enabled, the higher the memory footprint. Yet, even after adding Fanboy's two extra lists, hpHosts’s Ad and tracking servers, uBlock₀ still has a lower memory footprint than other very popular blockers out there. +Of course, the more filters enabled, the higher the memory footprint. Yet, even after adding Fanboy's two extra lists, hpHosts’s Ad and tracking servers, uBlock Origin still has a lower memory footprint than other very popular blockers out there. Also, be aware that selecting some of these extra lists may lead to higher likelihood of web site breakage -- especially those lists which are normally used as hosts file. *** -Without the preset lists of filters, this extension is nothing. So if ever you really do want to contribute something, think about the people working hard to maintain the filter lists you are using, which were made available to use by all for free. - -*** - Free. Open source with public license (GPLv3) For users by users. -Contributors @ Github: https://github.com/gorhill/uBlock/graphs/contributors -Contributors @ Crowdin: https://crowdin.net/project/ublock +If ever you really do want to contribute something, think about the people working hard to maintain the filter lists you are using, which were made available to use by all for free. *** -It's quite an early version, keep this in mind when you review. +Documentation: +https://github.com/gorhill/uBlock/wiki Project change log: https://github.com/gorhill/uBlock/releases + +Contributors @ Github: +https://github.com/gorhill/uBlock/graphs/contributors + +Contributors @ Crowdin: +https://crowdin.net/project/ublock -- cgit v1.1 From 83037bcf2f071dc68c6b3022b998ef685737d9da Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 22 Sep 2015 10:04:18 -0400 Subject: better documentation link --- dist/description/description-en.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/description/description-en.txt b/dist/description/description-en.txt index 35c9c28..9fbac7d 100644 --- a/dist/description/description-en.txt +++ b/dist/description/description-en.txt @@ -39,7 +39,7 @@ If ever you really do want to contribute something, think about the people worki *** Documentation: -https://github.com/gorhill/uBlock/wiki +https://github.com/gorhill/uBlock#ublock-origin Project change log: https://github.com/gorhill/uBlock/releases -- cgit v1.1 From 38cedf1d7ab6dd702178ae3b475e3b2782f080d9 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 22 Sep 2015 14:09:35 -0400 Subject: this fixes https://github.com/chrisaljoudi/uBlock/issues/1546 --- assets/checksums.txt | 2 +- assets/ublock/unbreak.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 6ba2de9..a0024d0 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,4 +1,4 @@ -6f506c670bd425f4743c3056d5a51d83 assets/ublock/unbreak.txt +3c418039a26f4f9c4b43a1e843b1208e assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt 231c4b0325c8a908826df70488521849 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt diff --git a/assets/ublock/unbreak.txt b/assets/ublock/unbreak.txt index a22a93d..3398288 100644 --- a/assets/ublock/unbreak.txt +++ b/assets/ublock/unbreak.txt @@ -114,8 +114,9 @@ ovh.strim.io#@##tweets # From Chrome store: "Go to site http://www.vd.nl/ ... links from dropdown top menu do not work" # https://github.com/gorhill/uBlock/issues/349 : "conflicting with reddit's gold popup box" +# https://github.com/chrisaljoudi/uBlock/issues/1546 # To counter Dan Pollock's, hpHosts, MVPS, Peter Lowe's -@@||google-analytics.com/analytics.js$domain=reddit.com|www.vd.nl +@@||google-analytics.com/analytics.js$domain=reddit.com|trello.com|www.vd.nl # https://github.com/chrisaljoudi/uBlock/issues/570 # To counter `yui.yahooapis.com` in hpHosts -- cgit v1.1 From 4b413227ddc5b70e2a39317a1569d9678421f775 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 23 Sep 2015 15:09:13 -0400 Subject: new benchmark data for FF41 --- doc/benchmarks/vim-test-abp-vs-ublock.png | Bin 300922 -> 230223 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/doc/benchmarks/vim-test-abp-vs-ublock.png b/doc/benchmarks/vim-test-abp-vs-ublock.png index bfb8886..0d8abc4 100644 Binary files a/doc/benchmarks/vim-test-abp-vs-ublock.png and b/doc/benchmarks/vim-test-abp-vs-ublock.png differ -- cgit v1.1 From 482e22ca5c31c4770bee77406ddb419161895939 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 24 Sep 2015 09:12:01 -0400 Subject: Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 422a8d7..5f0aca6 100644 --- a/README.md +++ b/README.md @@ -92,21 +92,19 @@ Once you install uBlock₀, you may easily un-select any of the pre-selected fil On average, uBlock₀ really does make your browser run leaner. [1]

Chromium [2]
-

+

Firefox
-

+

[1] Details of the benchmark available at Firefox version: benchmarking memory footprint.
-[2] Important note: There is currently a [bug in Chromium v39 to v41 which causes a new memory leak each time the popup UI of an extension is opened](https://code.google.com/p/chromium/issues/detail?id=441500). This affects all extensions. Keep this in mind when measuring Chromium's memory usage. In the benchmarks, I avoided opening the popups completely.
- #### CPU

-uBlock₀ is also easy on the CPU
+uBlock Origin is also easy on the CPU

Details of the benchmark available in this LibreOffice spreadsheet.

-- cgit v1.1 From d610aab52a8a4c5ec634574fd3ee2658bfb12a93 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 24 Sep 2015 09:13:23 -0400 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f0aca6..e5f2815 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Once you install uBlock₀, you may easily un-select any of the pre-selected fil
On average, uBlock₀ really does make your browser run leaner. [1]

-Chromium [2]
+Chromium


Firefox
-- cgit v1.1 From e858c912243d3f8ce01d5b88d3a9d589886e74cc Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 24 Sep 2015 09:14:10 -0400 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e5f2815..10e09ca 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Once you install uBlock₀, you may easily un-select any of the pre-selected fil #### Memory
-On average, uBlock₀ really does make your browser run leaner. [1]

+On average, uBlock Origin does make your browser run leaner. [1]

Chromium


-- cgit v1.1 From 93fb1dd251f4fdfb6b5c265074952f5d1ee52e97 Mon Sep 17 00:00:00 2001 From: Neil Richardson Date: Fri, 25 Sep 2015 14:52:54 +0800 Subject: Do not call onReady if addon is installing If the uBlock extension is installed globally for all users on a machine, a user's first run of Firefox will fail to load uBlock because the call to appShell.hiddenDOMWindow will throw an exception. A second run of Firefox will load uBlock successfully. The change will skip the call to onReady if the reason for the call to startup is because the addon is being installed. --- platform/firefox/bootstrap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/firefox/bootstrap.js b/platform/firefox/bootstrap.js index d1adfc4..d8046b8 100644 --- a/platform/firefox/bootstrap.js +++ b/platform/firefox/bootstrap.js @@ -86,7 +86,7 @@ function startup(data, reason) { ); }; - if ( reason !== APP_STARTUP ) { + if ( reason !== APP_STARTUP && reason !== ADDON_INSTALL) { onReady(); return; } -- cgit v1.1 From 69d4a0aa0ac8fd87412292894e2b5948a5861907 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 25 Sep 2015 08:29:52 -0400 Subject: attempt at fixing #362 --- platform/firefox/vapi-background.js | 5 ++++- src/css/popup.css | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index a74fd23..bf531c0 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -2131,9 +2131,12 @@ vAPI.toolbarButton = { resizeTimer = null; var body = iframe.contentDocument.body; panel.parentNode.style.maxWidth = 'none'; + + // https://github.com/gorhill/uMatrix/issues/362 + panel.parentNode.style.opacity = '1'; + // https://github.com/chrisaljoudi/uBlock/issues/730 // Voodoo programming: this recipe works - var clientHeight = body.clientHeight; iframe.style.height = toPx(clientHeight); panel.style.height = toPx(clientHeight + panel.boxObject.height - panel.clientHeight); diff --git a/src/css/popup.css b/src/css/popup.css index 50b0f0e..cef5934 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -3,6 +3,7 @@ body { border: 0; float: left; margin: 0; + opacity: 1; overflow: hidden; padding: 0; white-space: nowrap; -- cgit v1.1 From de2d993d61d9d0449019de58eb484c877b122584 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 25 Sep 2015 08:31:46 -0400 Subject: re. #724: configurable xhr timeout --- src/js/assets.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/assets.js b/src/js/assets.js index 8549cd8..d26d04c 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -61,6 +61,7 @@ var lastRepoMetaTimestamp = 0; var lastRepoMetaIsRemote = false; var refreshRepoMetaPeriod = 5 * oneHour; var errorCantConnectTo = vAPI.i18n('errorCantConnectTo'); +var xhrTimeout = vAPI.localStorage.getItem('xhrTimeout') || 30000; var exports = { autoUpdate: true, @@ -318,7 +319,7 @@ var getTextFileFromURL = function(url, onLoad, onError) { var xhr = new XMLHttpRequest(); try { xhr.open('get', url, true); - xhr.timeout = 30000; + xhr.timeout = xhrTimeout; xhr.onload = onResponseReceived; xhr.onerror = onErrorReceived; xhr.ontimeout = onErrorReceived; -- cgit v1.1 From fc65c79d84bc809f8c26ad936af00b7bddd93198 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 25 Sep 2015 08:33:50 -0400 Subject: interim version for dev build --- platform/chromium/manifest.json | 2 +- platform/opera/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index 7c25ce9..9aa67ab 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.1.1", + "version": "1.1.2", "default_locale": "en", "description": "__MSG_extShortDesc__", diff --git a/platform/opera/manifest.json b/platform/opera/manifest.json index 6ebbd32..a556d4a 100644 --- a/platform/opera/manifest.json +++ b/platform/opera/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.1.1", + "version": "1.1.2", "default_locale": "en", "description": "__MSG_extShortDesc__", -- cgit v1.1 From 55b99543f545dfa69b6901284de1491f2b8a749f Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 25 Sep 2015 08:58:38 -0400 Subject: translation work from https://crowdin.com/project/ublock --- src/_locales/it/messages.json | 4 ++-- src/_locales/ko/messages.json | 2 +- src/_locales/nb/messages.json | 4 ++-- src/_locales/sv/messages.json | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/_locales/it/messages.json b/src/_locales/it/messages.json index a224459..7087921 100644 --- a/src/_locales/it/messages.json +++ b/src/_locales/it/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"senza parametri", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"byte", "description":"" }, "dummy":{ diff --git a/src/_locales/ko/messages.json b/src/_locales/ko/messages.json index 2c16e04..608057f 100644 --- a/src/_locales/ko/messages.json +++ b/src/_locales/ko/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"매개 변수 없이", + "message":"제외 매개 변수", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ diff --git a/src/_locales/nb/messages.json b/src/_locales/nb/messages.json index 17f0f99..3474bf2 100644 --- a/src/_locales/nb/messages.json +++ b/src/_locales/nb/messages.json @@ -292,7 +292,7 @@ "description":"English: new version available" }, "3pExternalListObsolete":{ - "message":"utdatert", + "message":"utgått på dato", "description":"a filter list is 'out of date' (possibly needs to be updated)" }, "3pLastUpdate":{ @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"uten parametere", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ diff --git a/src/_locales/sv/messages.json b/src/_locales/sv/messages.json index a19adc7..a0fbb9f 100644 --- a/src/_locales/sv/messages.json +++ b/src/_locales/sv/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"utan parametrar", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"byte", "description":"" }, "dummy":{ -- cgit v1.1 From f681bac4071ed1bac978ebd2d161490d37e6793c Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 25 Sep 2015 11:54:07 -0400 Subject: reverting #739: this broke normal install --- platform/firefox/bootstrap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/firefox/bootstrap.js b/platform/firefox/bootstrap.js index d8046b8..d1adfc4 100644 --- a/platform/firefox/bootstrap.js +++ b/platform/firefox/bootstrap.js @@ -86,7 +86,7 @@ function startup(data, reason) { ); }; - if ( reason !== APP_STARTUP && reason !== ADDON_INSTALL) { + if ( reason !== APP_STARTUP ) { onReady(); return; } -- cgit v1.1 From 6c65672db0814d6202f7e4c20dba75f77e2426ff Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 25 Sep 2015 12:26:56 -0400 Subject: this fixes #640 --- platform/firefox/bootstrap.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/platform/firefox/bootstrap.js b/platform/firefox/bootstrap.js index d1adfc4..c765d98 100644 --- a/platform/firefox/bootstrap.js +++ b/platform/firefox/bootstrap.js @@ -19,7 +19,7 @@ Home: https://github.com/gorhill/uBlock */ -/* global ADDON_UNINSTALL, APP_SHUTDOWN, APP_STARTUP */ +/* global ADDON_UNINSTALL, APP_SHUTDOWN */ /* exported startup, shutdown, install, uninstall */ 'use strict'; @@ -48,7 +48,7 @@ const restartListener = { /******************************************************************************/ -function startup(data, reason) { +function startup(data/*, reason*/) { if ( data !== undefined ) { version = data.version; } @@ -86,7 +86,13 @@ function startup(data, reason) { ); }; - if ( reason !== APP_STARTUP ) { + var ready = false; + try { + ready = appShell.hiddenDOMWindow && + appShell.hiddenDOMWindow.document; + } catch (ex) { + } + if ( ready ) { onReady(); return; } -- cgit v1.1 From 9d90bb243f1a1fbd4b5a81ba684773b16541d8b6 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 26 Sep 2015 09:53:15 -0400 Subject: this addresses #275: test case send through email --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index a0024d0..c6be0c8 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 3c418039a26f4f9c4b43a1e843b1208e assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -231c4b0325c8a908826df70488521849 assets/ublock/filters.txt +e01eb3604173031d34ab7ca61ec31a34 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 706286a..7804d88 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -134,3 +134,7 @@ explosm.net##.inner-wrap > .row > .columns.large-8.medium-12 > hr + div:not(.row # https://www.reddit.com/r/facebook/comments/3ld5gn/ive_discovered_that_i_cant_access_facebook/ # Until all users have latest EasyList @@RPNcr3s-aD2.js$script,domain=facebook.com + +# https://github.com/gorhill/uBlock/issues/275 +jeu.info###page [class^="banniere-"] +||jeu.info^$inline-script -- cgit v1.1 From 7970f4dc70cbc878e0c2b616ef8e35e10edddf16 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 26 Sep 2015 19:07:23 -0400 Subject: new cosmetic filter to foil specific inline script tags --- src/js/contentscript-start.js | 22 ++++++++++++++++++++-- src/js/cosmetic-filtering.js | 23 ++++++++++++++++++++--- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/js/contentscript-start.js b/src/js/contentscript-start.js index ac7d924..0eaa1d9 100644 --- a/src/js/contentscript-start.js +++ b/src/js/contentscript-start.js @@ -74,6 +74,7 @@ var localMessager = vAPI.messaging.channel('contentscript-start.js'); var cosmeticFilters = function(details) { var donthideCosmeticFilters = {}; var hideCosmeticFilters = {}; + var scriptTagFilters = []; var donthide = details.cosmeticDonthide; var hide = details.cosmeticHide; var i; @@ -91,9 +92,14 @@ var cosmeticFilters = function(details) { selector = hide[i]; if ( donthideCosmeticFilters[selector] ) { hide.splice(i, 1); - } else { - hideCosmeticFilters[selector] = true; + continue; } + if ( selector.lastIndexOf('script//:', 0) === 0 ) { + scriptTagFilters.push(selector.slice(9)); + hide.splice(i, 1); + continue; + } + hideCosmeticFilters[selector] = true; } } if ( hide.length !== 0 ) { @@ -111,6 +117,11 @@ var cosmeticFilters = function(details) { } vAPI.donthideCosmeticFilters = donthideCosmeticFilters; vAPI.hideCosmeticFilters = hideCosmeticFilters; + + if ( scriptTagFilters.length !== 0 ) { + vAPI.reScriptTagFilters = new RegExp(scriptTagFilters.join('|')); + document.addEventListener('beforescriptexecute', onBeforeScriptExecuteHandler); + } }; var netFilters = function(details) { @@ -128,6 +139,13 @@ var netFilters = function(details) { //console.debug('document.querySelectorAll("%s") = %o', text, document.querySelectorAll(text)); }; +var onBeforeScriptExecuteHandler = function(ev) { + if ( vAPI.reScriptTagFilters.test(ev.target.textContent) ) { + ev.preventDefault(); + ev.stopPropagation(); + } +}; + var filteringHandler = function(details) { var styleTagCount = vAPI.styles.length; diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index 9a5d23f..5d386af 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -283,6 +283,20 @@ FilterParser.prototype.parse = function(s) { this.suffix = this.suffix.slice(1); } + // Script tag filters: pre-process them so that can be used with minimal + // overhead in the content script. + if ( + this.suffix.lastIndexOf('script:contains(/', 0) === 0 && + this.suffix.slice(-2) === '/)' + ) { + // Currently supported only as non-generic selector. + if ( this.prefix.length === 0 ) { + this.invalid = true; + return this; + } + this.suffix = 'script//:' + this.suffix.slice(17, -2).replace(/\\/g, '\\'); + } + this.unhide = matches[2].charAt(1) === '@' ? 1 : 0; if ( this.prefix !== '' ) { this.hostnames = this.prefix.split(/\s*,\s*/); @@ -576,11 +590,14 @@ FilterContainer.prototype.isValidSelector = (function() { try { // https://github.com/gorhill/uBlock/issues/693 div.matches(s + ',\n#foo'); + return true; } catch (e) { - console.error('uBlock> invalid cosmetic filter:', s); - return false; } - return true; + if ( s.lastIndexOf('script//:', 0) === 0 ) { + return true; + } + console.error('uBlock> invalid cosmetic filter:', s); + return false; }; })(); -- cgit v1.1 From e62246b380a993a208b98d103bdf4b7bc03ef37d Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 26 Sep 2015 19:10:05 -0400 Subject: translation work from https://crowdin.com/project/ublock --- src/_locales/da/messages.json | 20 ++++++++++---------- src/_locales/ro/messages.json | 2 +- src/_locales/uk/messages.json | 4 ++-- src/_locales/zh_CN/messages.json | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/_locales/da/messages.json b/src/_locales/da/messages.json index 268240e..ca72885 100644 --- a/src/_locales/da/messages.json +++ b/src/_locales/da/messages.json @@ -104,7 +104,7 @@ "description":"" }, "popup3pPassiveRulePrompt":{ - "message":"3rd-party css\/images", + "message":"Tredjeparts css\/billeder", "description":"" }, "popupInlineScriptRulePrompt":{ @@ -176,7 +176,7 @@ "description":"English: Color-blind friendly" }, "settingsCloudStorageEnabledPrompt":{ - "message":"Enable cloud storage support", + "message":"Aktiver støtte for sky-lagring", "description":"" }, "settingsAdvancedUserPrompt":{ @@ -192,7 +192,7 @@ "description":"English: " }, "settingsWebRTCIPAddressHiddenPrompt":{ - "message":"Prevent WebRTC from leaking local IP addresses", + "message":"Forhindre WebRTC i at lække lokale IP-adresser", "description":"English: " }, "settingsExperimentalPrompt":{ @@ -436,7 +436,7 @@ "description":"Small header to identify the static filtering section" }, "loggerStaticFilteringSentence":{ - "message":"{{action}} netværksanmodninger af {{type}} {{br}}som matcher følgende URL {{url}} {{br}}som stammer fra {{origin}},{{br}}{{importance}} der er et matchende undtagelses-filter.", + "message":"{{action}} netværksanmodninger af {{type}} {{br}}som matcher følgende URL {{url}} {{br}}og som stammer fra {{origin}},{{br}}{{importance}} der er et matchende undtagelses-filter.", "description":"Used in the static filtering wizard" }, "loggerStaticFilteringSentencePartBlock":{ @@ -572,11 +572,11 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"uden parametre", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ - "message":"Found in:", + "message":"Fundet i:", "description":"English: List of filter list names follows" }, "docblockedBack":{ @@ -600,11 +600,11 @@ "description":"English: Permanently" }, "cloudPush":{ - "message":"Export to cloud storage", + "message":"Eksporter til skylagring", "description":"tooltip" }, "cloudPull":{ - "message":"Import from cloud storage", + "message":"Importer fra skylagring", "description":"tooltip" }, "cloudNoData":{ @@ -612,11 +612,11 @@ "description":"" }, "cloudDeviceNamePrompt":{ - "message":"This device name:", + "message":"Denne enheds navn:", "description":"used as a prompt for the user to provide a custom device name" }, "genericSubmit":{ - "message":"Submit", + "message":"Indsend", "description":"for generic 'submit' buttons" }, "genericRevert":{ diff --git a/src/_locales/ro/messages.json b/src/_locales/ro/messages.json index d8a937e..2cb9135 100644 --- a/src/_locales/ro/messages.json +++ b/src/_locales/ro/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"fără parametrii", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ diff --git a/src/_locales/uk/messages.json b/src/_locales/uk/messages.json index a652df6..5989236 100644 --- a/src/_locales/uk/messages.json +++ b/src/_locales/uk/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"без параметрів", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"байти", "description":"" }, "dummy":{ diff --git a/src/_locales/zh_CN/messages.json b/src/_locales/zh_CN/messages.json index b938a8e..c1701c9 100644 --- a/src/_locales/zh_CN/messages.json +++ b/src/_locales/zh_CN/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"没有参数", + "message":"无参数", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ -- cgit v1.1 From 12baeadac448d8b614399ace31218d511d5a9d41 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 27 Sep 2015 10:13:31 -0400 Subject: code review of new script tag filtering code --- src/js/contentscript-start.js | 23 ++++++--------- src/js/cosmetic-filtering.js | 67 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 73 insertions(+), 17 deletions(-) diff --git a/src/js/contentscript-start.js b/src/js/contentscript-start.js index 0eaa1d9..3d78a9f 100644 --- a/src/js/contentscript-start.js +++ b/src/js/contentscript-start.js @@ -74,7 +74,6 @@ var localMessager = vAPI.messaging.channel('contentscript-start.js'); var cosmeticFilters = function(details) { var donthideCosmeticFilters = {}; var hideCosmeticFilters = {}; - var scriptTagFilters = []; var donthide = details.cosmeticDonthide; var hide = details.cosmeticHide; var i; @@ -92,14 +91,9 @@ var cosmeticFilters = function(details) { selector = hide[i]; if ( donthideCosmeticFilters[selector] ) { hide.splice(i, 1); - continue; + } else { + hideCosmeticFilters[selector] = true; } - if ( selector.lastIndexOf('script//:', 0) === 0 ) { - scriptTagFilters.push(selector.slice(9)); - hide.splice(i, 1); - continue; - } - hideCosmeticFilters[selector] = true; } } if ( hide.length !== 0 ) { @@ -117,11 +111,6 @@ var cosmeticFilters = function(details) { } vAPI.donthideCosmeticFilters = donthideCosmeticFilters; vAPI.hideCosmeticFilters = hideCosmeticFilters; - - if ( scriptTagFilters.length !== 0 ) { - vAPI.reScriptTagFilters = new RegExp(scriptTagFilters.join('|')); - document.addEventListener('beforescriptexecute', onBeforeScriptExecuteHandler); - } }; var netFilters = function(details) { @@ -140,13 +129,14 @@ var netFilters = function(details) { }; var onBeforeScriptExecuteHandler = function(ev) { - if ( vAPI.reScriptTagFilters.test(ev.target.textContent) ) { + if ( vAPI.reScriptTagRegex.test(ev.target.textContent) ) { ev.preventDefault(); ev.stopPropagation(); } }; var filteringHandler = function(details) { + var value; var styleTagCount = vAPI.styles.length; vAPI.skipCosmeticFiltering = !details || details.skipCosmeticFiltering; @@ -157,6 +147,11 @@ var filteringHandler = function(details) { if ( details.netHide.length !== 0 ) { netFilters(details); } + value = details.scriptTagRegex; + if ( typeof value === 'string' && value.length !== 0 ) { + vAPI.reScriptTagRegex = new RegExp(value); + document.addEventListener('beforescriptexecute', onBeforeScriptExecuteHandler); + } // The port will never be used again at this point, disconnecting allows // the browser to flush this script from memory. } diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index 5d386af..8a0afa8 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -237,6 +237,7 @@ var FilterParser = function() { this.invalid = false; this.cosmetic = true; this.reParser = /^\s*([^#]*)(##|#@#)(.+)\s*$/; + this.reScriptSelectorParser = /^script:contains\(\/.+?\/\)$/; }; /******************************************************************************/ @@ -286,8 +287,8 @@ FilterParser.prototype.parse = function(s) { // Script tag filters: pre-process them so that can be used with minimal // overhead in the content script. if ( - this.suffix.lastIndexOf('script:contains(/', 0) === 0 && - this.suffix.slice(-2) === '/)' + this.suffix.charAt(0) === 's' && + this.reScriptSelectorParser.test(this.suffix) ) { // Currently supported only as non-generic selector. if ( this.prefix.length === 0 ) { @@ -568,6 +569,8 @@ FilterContainer.prototype.reset = function() { // hostname, entity-based filters this.hostnameFilters = {}; this.entityFilters = {}; + this.scriptTagFilters = {}; + this.scriptTagFilterCount = 0; }; /******************************************************************************/ @@ -807,6 +810,11 @@ FilterContainer.prototype.fromCompiledContent = function(text, lineBeg, skip) { // h ir twitter.com .promoted-tweet if ( fields[0] === 'h' ) { + // Special filter: script tags. Not a real CSS selector. + if ( fields[3].lastIndexOf('script//:', 0) === 0 ) { + this.createScriptTagFilter(fields[2], fields[3].slice(9)); + continue; + } filter = new FilterHostname(fields[3], fields[2]); bucket = this.hostnameFilters[fields[1]]; if ( bucket === undefined ) { @@ -838,6 +846,11 @@ FilterContainer.prototype.fromCompiledContent = function(text, lineBeg, skip) { // entity selector if ( fields[0] === 'e' ) { + // Special filter: script tags. Not a real CSS selector. + if ( fields[2].lastIndexOf('script//:', 0) === 0 ) { + this.createScriptTagFilter(fields[1], fields[2].slice(9)); + continue; + } bucket = this.entityFilters[fields[1]]; if ( bucket === undefined ) { this.entityFilters[fields[1]] = [fields[2]]; @@ -903,6 +916,49 @@ FilterContainer.prototype.skipCompiledContent = function(text, lineBeg) { /******************************************************************************/ +FilterContainer.prototype.createScriptTagFilter = function(hostname, s) { + if ( this.scriptTagFilters.hasOwnProperty(hostname) ) { + this.scriptTagFilters[hostname] += '|' + s; + } else { + this.scriptTagFilters[hostname] = s; + } + this.scriptTagFilterCount += 1; +}; + +/******************************************************************************/ + +FilterContainer.prototype.retrieveScriptTagRegex = function(domain, hostname) { + if ( this.scriptTagFilterCount === 0 ) { + return; + } + var out = [], hn = hostname, pos; + for (;;) { + if ( this.scriptTagFilters.hasOwnProperty(hn) ) { + out.push(this.scriptTagFilters[hn]); + } + if ( hn === domain ) { + break; + } + pos = hn.indexOf('.'); + if ( pos === -1 ) { + break; + } + hn = hn.slice(pos + 1); + } + pos = domain.indexOf('.'); + if ( pos !== -1 ) { + hn = domain.slice(0, pos); + if ( this.scriptTagFilters.hasOwnProperty(hn) ) { + out.push(this.scriptTagFilters[hn]); + } + } + if ( out.length !== 0 ) { + return out.join('|'); + } +}; + +/******************************************************************************/ + FilterContainer.prototype.freeze = function() { this.duplicateBuster = {}; @@ -956,7 +1012,9 @@ FilterContainer.prototype.toSelfie = function() { highMediumGenericHideCount: this.highMediumGenericHideCount, highHighGenericHide: this.highHighGenericHide, highHighGenericHideCount: this.highHighGenericHideCount, - genericDonthide: this.genericDonthide + genericDonthide: this.genericDonthide, + scriptTagFilters: this.scriptTagFilters, + scriptTagFilterCount: this.scriptTagFilterCount }; }; @@ -1017,6 +1075,8 @@ FilterContainer.prototype.fromSelfie = function(selfie) { this.highHighGenericHide = selfie.highHighGenericHide; this.highHighGenericHideCount = selfie.highHighGenericHideCount; this.genericDonthide = selfie.genericDonthide; + this.scriptTagFilters = selfie.scriptTagFilters; + this.scriptTagFilterCount = selfie.scriptTagFilterCount; this.frozen = true; }; @@ -1197,6 +1257,7 @@ FilterContainer.prototype.retrieveDomainSelectors = function(request) { cosmeticHide: [], cosmeticDonthide: [], netHide: [], + scriptTagRegex: this.retrieveScriptTagRegex(domain, hostname), netCollapse: µb.userSettings.collapseBlocked }; -- cgit v1.1 From 879f7a225536b9ad6c88648c351f9104f0017378 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 27 Sep 2015 10:15:03 -0400 Subject: translation work from https://crowdin.com/project/ublock --- src/_locales/ro/messages.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_locales/ro/messages.json b/src/_locales/ro/messages.json index 2cb9135..3fe1610 100644 --- a/src/_locales/ro/messages.json +++ b/src/_locales/ro/messages.json @@ -16,7 +16,7 @@ "description":"appears as tab name in dashboard" }, "3pPageName":{ - "message":"Filtre externe", + "message":"Filtre terțe", "description":"appears as tab name in dashboard" }, "1pPageName":{ @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"fără parametrii", + "message":"fără parametri", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"octeți", "description":"" }, "dummy":{ -- cgit v1.1 From 97a2cf8d58bbff6f10f11c469b3ae799fa09c07d Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 28 Sep 2015 09:48:39 -0400 Subject: this addresses #759 -- until fix is in EasyPrivacy --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index c6be0c8..6bc3584 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 3c418039a26f4f9c4b43a1e843b1208e assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -e01eb3604173031d34ab7ca61ec31a34 assets/ublock/filters.txt +effa803f2fae1dd1fca06f19563fbac6 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 7804d88..0f08fdf 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -138,3 +138,8 @@ explosm.net##.inner-wrap > .row > .columns.large-8.medium-12 > hr + div:not(.row # https://github.com/gorhill/uBlock/issues/275 jeu.info###page [class^="banniere-"] ||jeu.info^$inline-script + +# https://github.com/gorhill/uBlock/issues/759 +# Until fixed in EasyPrivacy +@@||eplayerhtml5.performgroup.com/js/tsEplayerHtml5/js/Eplayer/js/quantcast/quant.js$script,first-party +@@||eplayerhtml5.performgroup.com/js/tsEplayerHtml5/js/Eplayer/js/quantcast/vquant.js$script,first-party -- cgit v1.1 From 34b58178bc7abafb55b6c2c1fd69c80f1be5b938 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 28 Sep 2015 15:50:09 -0400 Subject: this fixes #762 --- src/js/contentscript-end.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/js/contentscript-end.js b/src/js/contentscript-end.js index 776862f..16d0cbf 100644 --- a/src/js/contentscript-end.js +++ b/src/js/contentscript-end.js @@ -474,13 +474,12 @@ var uBlockCollapser = (function() { var elem, shadow; while ( i-- ) { elem = elems[i]; - shadow = elem.shadowRoot; + // https://github.com/gorhill/uBlock/issues/762 + // Always hide using inline style. + elem.style.setProperty('display', 'none', 'important'); // https://www.chromestatus.com/features/4668884095336448 // "Multiple shadow roots is being deprecated." - if ( shadow !== null ) { - if ( shadow.className !== sessionId ) { - elem.style.setProperty('display', 'none', 'important'); - } + if ( elem.shadowRoot !== null ) { continue; } // https://github.com/gorhill/uBlock/pull/555 @@ -490,7 +489,6 @@ var uBlockCollapser = (function() { shadow = elem.createShadowRoot(); shadow.className = sessionId; } catch (ex) { - elem.style.setProperty('display', 'none', 'important'); } } }; -- cgit v1.1 From cc17a77b0ac69ba73299148e2a710dcbd5069a21 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 28 Sep 2015 15:51:02 -0400 Subject: this fixes #762 --- src/js/contentscript-start.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/js/contentscript-start.js b/src/js/contentscript-start.js index 3d78a9f..6397a1e 100644 --- a/src/js/contentscript-start.js +++ b/src/js/contentscript-start.js @@ -196,13 +196,12 @@ var hideElements = function(selectors) { var elem, shadow; while ( i-- ) { elem = elems[i]; - shadow = elem.shadowRoot; + // https://github.com/gorhill/uBlock/issues/762 + // Always hide using inline style. + elem.style.setProperty('display', 'none', 'important'); // https://www.chromestatus.com/features/4668884095336448 // "Multiple shadow roots is being deprecated." - if ( shadow !== null ) { - if ( shadow.className !== sessionId ) { - elem.style.setProperty('display', 'none', 'important'); - } + if ( elem.shadowRoot !== null ) { continue; } // https://github.com/gorhill/uBlock/pull/555 @@ -212,7 +211,6 @@ var hideElements = function(selectors) { shadow = elem.createShadowRoot(); shadow.className = sessionId; } catch (ex) { - elem.style.setProperty('display', 'none', 'important'); } } }; -- cgit v1.1 From 8d294869fe252b54c08a14fc9b94722c2ace56ef Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 30 Sep 2015 09:33:38 -0400 Subject: this fixes #756 --- platform/firefox/frameModule.js | 42 ++++++++++++---- platform/firefox/frameScript.js | 33 ++++++++----- platform/firefox/vapi-background.js | 96 ++++++++++++++++++++++++++++++------- platform/firefox/vapi-client.js | 37 ++++++++++++++ src/background.html | 1 + src/js/contentscript-start.js | 13 ----- src/js/cosmetic-filtering.js | 17 ++++--- 7 files changed, 180 insertions(+), 59 deletions(-) diff --git a/platform/firefox/frameModule.js b/platform/firefox/frameModule.js index a11720e..98fc107 100644 --- a/platform/firefox/frameModule.js +++ b/platform/firefox/frameModule.js @@ -30,6 +30,7 @@ const {Services} = Cu.import('resource://gre/modules/Services.jsm', null); const {XPCOMUtils} = Cu.import('resource://gre/modules/XPCOMUtils.jsm', null); const hostName = Services.io.newURI(Components.stack.filename, null, null).host; +const rpcEmitterName = hostName + ':child-process-message'; //Cu.import('resource://gre/modules/devtools/Console.jsm'); @@ -239,9 +240,25 @@ const contentObserver = { wantXHRConstructor: false }); + if ( Services.cpmm ) { + sandbox.rpc = function(details) { + var svc = Services; + if ( svc === undefined ) { return; } + var cpmm = svc.cpmm; + if ( !cpmm ) { return; } + var r = cpmm.sendSyncMessage(rpcEmitterName, details); + if ( Array.isArray(r) ) { + return r[0]; + } + }; + } else { + sandbox.rpc = function() {}; + } + sandbox.injectScript = function(script) { - if ( Services !== undefined ) { - Services.scriptloader.loadSubScript(script, sandbox); + var svc = Services; + if ( svc !== undefined ) { + svc.scriptloader.loadSubScript(script, sandbox); } else { // Sandbox appears void. // I've seen this happens, need to investigate why. @@ -258,9 +275,10 @@ const contentObserver = { sandbox.removeMessageListener(); sandbox.addMessageListener = sandbox.injectScript = + sandbox.outerShutdown = sandbox.removeMessageListener = - sandbox.sendAsyncMessage = - sandbox.outerShutdown = function(){}; + sandbox.rpc = + sandbox.sendAsyncMessage = function(){}; sandbox.vAPI = {}; messager = null; }; @@ -412,13 +430,19 @@ const LocationChangeListener = function(docShell) { var requestor = docShell.QueryInterface(Ci.nsIInterfaceRequestor); var ds = requestor.getInterface(Ci.nsIWebProgress); + if ( !ds ) { + return; + } var mm = requestor.getInterface(Ci.nsIContentFrameMessageManager); - - if ( ds && mm && typeof mm.sendAsyncMessage === 'function' ) { - this.docShell = ds; - this.messageManager = mm; - ds.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_LOCATION); + if ( !mm ) { + return; + } + if ( typeof mm.sendAsyncMessage !== 'function' ) { + return; } + this.docShell = ds; + this.messageManager = mm; + ds.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_LOCATION); }; LocationChangeListener.prototype.QueryInterface = XPCOMUtils.generateQI([ diff --git a/platform/firefox/frameScript.js b/platform/firefox/frameScript.js index fdee50c..17cd84f 100644 --- a/platform/firefox/frameScript.js +++ b/platform/firefox/frameScript.js @@ -19,13 +19,11 @@ Home: https://github.com/gorhill/uBlock */ -/* global addMessageListener, removeMessageListener, docShell */ - /******************************************************************************/ -var locationChangeListener; // Keep alive while frameScript is alive +// https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Frame_script_environment -(function() { +(function(context) { 'use strict'; @@ -52,25 +50,36 @@ let injectContentScripts = function(win) { }; let onLoadCompleted = function() { - removeMessageListener('ublock0-load-completed', onLoadCompleted); - injectContentScripts(content); + context.removeMessageListener('ublock0-load-completed', onLoadCompleted); + injectContentScripts(context.content); }; +context.addMessageListener('ublock0-load-completed', onLoadCompleted); -addMessageListener('ublock0-load-completed', onLoadCompleted); +let shutdown = function(ev) { + if ( ev.target !== context ) { + return; + } + context.removeMessageListener('ublock0-load-completed', onLoadCompleted); + context.removeEventListener('unload', shutdown); + context.locationChangeListener = null; + LocationChangeListener = null; + contentObserver = null; +}; +context.addEventListener('unload', shutdown); -if ( docShell ) { +if ( context.docShell ) { let Ci = Components.interfaces; - let wp = docShell.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIWebProgress); + let wp = context.docShell.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebProgress); let dw = wp.DOMWindow; if ( dw === dw.top ) { - locationChangeListener = new LocationChangeListener(docShell); + context.locationChangeListener = new LocationChangeListener(context.docShell); } } /******************************************************************************/ -})(); +})(this); /******************************************************************************/ diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index bf531c0..8bc110b 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -70,7 +70,7 @@ vAPI.localStorage.setDefaultBool('forceLegacyToolbarButton', false); var cleanupTasks = []; // This must be updated manually, every time a new task is added/removed -var expectedNumberOfCleanups = 7; +var expectedNumberOfCleanups = 8; window.addEventListener('unload', function() { if ( typeof vAPI.app.onShutdown === 'function' ) { @@ -90,10 +90,11 @@ window.addEventListener('unload', function() { } // frameModule needs to be cleared too + var frameModuleURL = vAPI.getURL('frameModule.js'); var frameModule = {}; - Cu.import(vAPI.getURL('frameModule.js'), frameModule); + Cu.import(frameModuleURL, frameModule); frameModule.contentObserver.unregister(); - Cu.unload(vAPI.getURL('frameModule.js')); + Cu.unload(frameModuleURL); }); /******************************************************************************/ @@ -987,15 +988,15 @@ var tabWatcher = (function() { }; // https://developer.mozilla.org/en-US/docs/Web/Events/TabOpen - var onOpen = function({target}) { - var tabId = tabIdFromTarget(target); - var browser = browserFromTabId(tabId); - vAPI.tabs.onNavigation({ - frameId: 0, - tabId: tabId, - url: browser.currentURI.asciiSpec, - }); - }; + //var onOpen = function({target}) { + // var tabId = tabIdFromTarget(target); + // var browser = browserFromTabId(tabId); + // vAPI.tabs.onNavigation({ + // frameId: 0, + // tabId: tabId, + // url: browser.currentURI.asciiSpec, + // }); + //}; // https://developer.mozilla.org/en-US/docs/Web/Events/TabShow var onShow = function({target}) { @@ -1208,7 +1209,7 @@ vAPI.messaging = { return Cc['@mozilla.org/globalmessagemanager;1'] .getService(Ci.nsIMessageListenerManager); }, - frameScript: vAPI.getURL('frameScript.js'), + frameScriptURL: vAPI.getURL('frameScript.js'), listeners: {}, defaultHandler: null, NOOPFUNC: function(){}, @@ -1438,7 +1439,7 @@ vAPI.messaging.setup = function(defaultHandler) { this.onMessage ); - this.globalMessageManager.loadFrameScript(this.frameScript, true); + this.globalMessageManager.loadFrameScript(this.frameScriptURL, true); cleanupTasks.push(function() { var gmm = vAPI.messaging.globalMessageManager; @@ -1452,7 +1453,7 @@ vAPI.messaging.setup = function(defaultHandler) { }) ); - gmm.removeDelayedFrameScript(vAPI.messaging.frameScript); + gmm.removeDelayedFrameScript(vAPI.messaging.frameScriptURL); gmm.removeMessageListener( location.host + ':background', vAPI.messaging.onMessage @@ -1472,6 +1473,60 @@ vAPI.messaging.broadcast = function(message) { }; /******************************************************************************/ +/******************************************************************************/ + +// Synchronous messaging: Firefox allows this. Chromium does not allow this. + +// Sometimes there is no way around synchronous messaging, as long as: +// - the code at the other end execute fast and return quickly. +// - it's not abused. +// Original rationale is . +// Synchronous messaging is a good solution for this case because: +// - It's done only *once* per page load. (Keep in mind there is already a +// sync message sent for each single network request on a page and it's not +// an issue, because the code executed is trivial, which is the key -- see +// shouldLoadListener below). +// - The code at the other end is fast. +// Though vAPI.rpcReceiver was brought forth because of this one case, I +// generalized the concept for whatever future need for synchronous messaging +// which might arise. + +// https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Message_Manager/Message_manager_overview#Content_frame_message_manager + +vAPI.rpcReceiver = (function() { + var calls = Object.create(null); + var childProcessMessageName = location.host + ':child-process-message'; + + var onChildProcessMessage = function(ev) { + var msg = ev.data; + if ( !msg ) { return; } + var fn = calls[msg.fnName]; + if ( typeof fn === 'function' ) { + return fn(msg); + } + }; + + if ( Services.ppmm ) { + Services.ppmm.addMessageListener( + childProcessMessageName, + onChildProcessMessage + ); + } + + cleanupTasks.push(function() { + if ( Services.ppmm ) { + Services.ppmm.removeMessageListener( + childProcessMessageName, + onChildProcessMessage + ); + } + }); + + return calls; +})(); + +/******************************************************************************/ +/******************************************************************************/ var httpObserver = { classDescription: 'net-channel-event-sinks for ' + location.host, @@ -1865,7 +1920,11 @@ vAPI.net.registerListeners = function() { var tabId = tabWatcher.tabIdFromTarget(e.target); var sourceTabId = null; - // Popup candidate + // Popup candidate: this code path is taken only for when a new top + // document loads, i.e. only once per document load. TODO: evaluate for + // popup filtering in an asynchrous manner -- it's not really required + // to evaluate on the spot. Still, there is currently no harm given + // this code path is typically taken only once per page load. if ( details.openerURL ) { for ( var browser of tabWatcher.browsers() ) { var URI = browser.currentURI; @@ -1899,8 +1958,9 @@ vAPI.net.registerListeners = function() { } } - //console.log('shouldLoadListener:', details.url); - + // We are being called synchronously from the content process, so we + // must return ASAP. The code below merely record the details of the + // request into a ring buffer for later retrieval by the HTTP observer. var pendingReq = httpObserver.createPendingRequest(details.url); pendingReq.frameId = details.frameId; pendingReq.parentFrameId = details.parentFrameId; diff --git a/platform/firefox/vapi-client.js b/platform/firefox/vapi-client.js index bd6facd..07da7c8 100644 --- a/platform/firefox/vapi-client.js +++ b/platform/firefox/vapi-client.js @@ -31,6 +31,13 @@ /******************************************************************************/ +// Not all sandbox are given an rpc function, so assign a dummy one it is +// missing -- this avoids the need for constantly testing before use. + +self.rpc = self.rpc || function(){}; + +/******************************************************************************/ + var vAPI = self.vAPI = self.vAPI || {}; vAPI.firefox = true; vAPI.sessionId = String.fromCharCode(Date.now() % 26 + 97) + @@ -67,6 +74,30 @@ vAPI.shutdown = (function() { /******************************************************************************/ +(function() { + var hostname = location.hostname; + if ( !hostname ) { + return; + } + var filters = self.rpc({ + fnName: 'getScriptTagFilters', + url: location.href, + hostname: hostname + }); + if ( typeof filters !== 'string' || filters === '' ) { + return; + } + var reFilters = new RegExp(filters); + document.addEventListener('beforescriptexecute', function(ev) { + if ( reFilters.test(ev.target.textContent) ) { + ev.preventDefault(); + ev.stopPropagation(); + } + }); +})(); + +/******************************************************************************/ + vAPI.messaging = { channels: {}, pending: {}, @@ -254,6 +285,12 @@ MessagingChannel.prototype.send = function(message, callback) { MessagingChannel.prototype.sendTo = function(message, toTabId, toChannel, callback) { var messaging = vAPI.messaging; + if ( !messaging ) { + if ( typeof callback === 'function' ) { + callback(); + } + return; + } // Too large a gap between the last request and the last response means // the main process is no longer reachable: memory leaks and bad // performance become a risk -- especially for long-lived, dynamic diff --git a/src/background.html b/src/background.html index 5852880..43863d2 100644 --- a/src/background.html +++ b/src/background.html @@ -30,6 +30,7 @@ + diff --git a/src/js/contentscript-start.js b/src/js/contentscript-start.js index 6397a1e..b4a2b04 100644 --- a/src/js/contentscript-start.js +++ b/src/js/contentscript-start.js @@ -128,15 +128,7 @@ var netFilters = function(details) { //console.debug('document.querySelectorAll("%s") = %o', text, document.querySelectorAll(text)); }; -var onBeforeScriptExecuteHandler = function(ev) { - if ( vAPI.reScriptTagRegex.test(ev.target.textContent) ) { - ev.preventDefault(); - ev.stopPropagation(); - } -}; - var filteringHandler = function(details) { - var value; var styleTagCount = vAPI.styles.length; vAPI.skipCosmeticFiltering = !details || details.skipCosmeticFiltering; @@ -147,11 +139,6 @@ var filteringHandler = function(details) { if ( details.netHide.length !== 0 ) { netFilters(details); } - value = details.scriptTagRegex; - if ( typeof value === 'string' && value.length !== 0 ) { - vAPI.reScriptTagRegex = new RegExp(value); - document.addEventListener('beforescriptexecute', onBeforeScriptExecuteHandler); - } // The port will never be used again at this point, disconnecting allows // the browser to flush this script from memory. } diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index 8a0afa8..1a0c873 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -237,7 +237,7 @@ var FilterParser = function() { this.invalid = false; this.cosmetic = true; this.reParser = /^\s*([^#]*)(##|#@#)(.+)\s*$/; - this.reScriptSelectorParser = /^script:contains\(\/.+?\/\)$/; + this.reScriptContains = /^script:contains\(.+?\)$/; }; /******************************************************************************/ @@ -286,16 +286,20 @@ FilterParser.prototype.parse = function(s) { // Script tag filters: pre-process them so that can be used with minimal // overhead in the content script. - if ( - this.suffix.charAt(0) === 's' && - this.reScriptSelectorParser.test(this.suffix) - ) { + // Example: focus.de##script:contains(/uabInject/) + if ( this.suffix.charAt(0) === 's' && this.reScriptContains.test(this.suffix) ) { // Currently supported only as non-generic selector. if ( this.prefix.length === 0 ) { this.invalid = true; return this; } - this.suffix = 'script//:' + this.suffix.slice(17, -2).replace(/\\/g, '\\'); + var suffix = this.suffix; + this.suffix = 'script//:'; + if ( suffix.charAt(16) !== '/' || suffix.slice(-2) !== '/)' ) { + this.suffix += suffix.slice(16, -1).replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + } else { + this.suffix += suffix.slice(17, -2).replace(/\\/g, '\\'); + } } this.unhide = matches[2].charAt(1) === '@' ? 1 : 0; @@ -1257,7 +1261,6 @@ FilterContainer.prototype.retrieveDomainSelectors = function(request) { cosmeticHide: [], cosmeticDonthide: [], netHide: [], - scriptTagRegex: this.retrieveScriptTagRegex(domain, hostname), netCollapse: µb.userSettings.collapseBlocked }; -- cgit v1.1 From c141a292958b045bafb1571cbd253f1fe6811e14 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 30 Sep 2015 09:35:24 -0400 Subject: comment grammar --- platform/firefox/vapi-client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/firefox/vapi-client.js b/platform/firefox/vapi-client.js index 07da7c8..b8715e8 100644 --- a/platform/firefox/vapi-client.js +++ b/platform/firefox/vapi-client.js @@ -31,8 +31,8 @@ /******************************************************************************/ -// Not all sandbox are given an rpc function, so assign a dummy one it is -// missing -- this avoids the need for constantly testing before use. +// Not all sandboxes are given an rpc function, so assign a dummy one if it is +// missing -- this avoids the need for testing before use. self.rpc = self.rpc || function(){}; -- cgit v1.1 From c46d1f6a52ed83353b04be7c7b1b07695dd0a823 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 30 Sep 2015 09:36:58 -0400 Subject: translation work from https://crowdin.com/project/ublock --- src/_locales/cs/messages.json | 4 ++-- src/_locales/ja/messages.json | 20 ++++++++++---------- src/_locales/sl/messages.json | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/_locales/cs/messages.json b/src/_locales/cs/messages.json index e2c4373..ebe1d36 100644 --- a/src/_locales/cs/messages.json +++ b/src/_locales/cs/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"bez parametrů", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"bajtů", "description":"" }, "dummy":{ diff --git a/src/_locales/ja/messages.json b/src/_locales/ja/messages.json index 01dce44..10f5b08 100644 --- a/src/_locales/ja/messages.json +++ b/src/_locales/ja/messages.json @@ -192,7 +192,7 @@ "description":"English: " }, "settingsWebRTCIPAddressHiddenPrompt":{ - "message":"Prevent WebRTC from leaking local IP addresses", + "message":"ローカルIPアドレスの漏洩をもたらすWebRTCを防止する", "description":"English: " }, "settingsExperimentalPrompt":{ @@ -436,7 +436,7 @@ "description":"Small header to identify the static filtering section" }, "loggerStaticFilteringSentence":{ - "message":"{{action}} network requests of {{type}} {{br}}which URL address matches {{url}} {{br}}and which originates {{origin}},{{br}}{{importance}} there is a matching exception filter.", + "message":"ネットワークリクエストが {{type}} である場合に、{{br}}URLアドレスが {{url}} と一致し、{{br}}{{origin}} を発信源としている場合は {{action}} をします。{{br}}{{importance}} が存在する場合は例外フィルターと一致させます。", "description":"Used in the static filtering wizard" }, "loggerStaticFilteringSentencePartBlock":{ @@ -452,7 +452,7 @@ "description":"Used in the static filtering wizard" }, "loggerStaticFilteringSentencePartAnyType":{ - "message":"any type", + "message":"任意の種類", "description":"Used in the static filtering wizard" }, "loggerStaticFilteringSentencePartOrigin":{ @@ -460,19 +460,19 @@ "description":"Used in the static filtering wizard" }, "loggerStaticFilteringSentencePartAnyOrigin":{ - "message":"from anywhere", + "message":"全体", "description":"Used in the static filtering wizard" }, "loggerStaticFilteringSentencePartNotImportant":{ - "message":"except when", + "message":"例外", "description":"Used in the static filtering wizard" }, "loggerStaticFilteringSentencePartImportant":{ - "message":"even if", + "message":"非例外", "description":"Used in the static filtering wizard" }, "loggerStaticFilteringFinderSentence1":{ - "message":"Static filter {{filter}} found in:", + "message":"静的フィルター {{filter}} が見つかりました:", "description":"Below this sentence, the filter lists in which the filter was found" }, "aboutChangelog":{ @@ -572,11 +572,11 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"パラメーター未指定", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ - "message":"Found in:", + "message":"次のフィルターで見つかりました:", "description":"English: List of filter list names follows" }, "docblockedBack":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"バイト", "description":"" }, "dummy":{ diff --git a/src/_locales/sl/messages.json b/src/_locales/sl/messages.json index 1fc5a14..c1087f2 100644 --- a/src/_locales/sl/messages.json +++ b/src/_locales/sl/messages.json @@ -104,7 +104,7 @@ "description":"" }, "popup3pPassiveRulePrompt":{ - "message":"3rd-party css\/images", + "message":"css\/slike tretje osebe", "description":"" }, "popupInlineScriptRulePrompt":{ @@ -176,7 +176,7 @@ "description":"English: Color-blind friendly" }, "settingsCloudStorageEnabledPrompt":{ - "message":"Enable cloud storage support", + "message":"Omogoči podporo za shrambo v oblako", "description":"" }, "settingsAdvancedUserPrompt":{ @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"brez parametrov", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -600,11 +600,11 @@ "description":"English: Permanently" }, "cloudPush":{ - "message":"Export to cloud storage", + "message":"Izvozi iz shrambe oblaka", "description":"tooltip" }, "cloudPull":{ - "message":"Import from cloud storage", + "message":"Uvozi iz shrambe oblaka", "description":"tooltip" }, "cloudNoData":{ @@ -612,11 +612,11 @@ "description":"" }, "cloudDeviceNamePrompt":{ - "message":"This device name:", + "message":"Ime te naprave:", "description":"used as a prompt for the user to provide a custom device name" }, "genericSubmit":{ - "message":"Submit", + "message":"Predloži", "description":"for generic 'submit' buttons" }, "genericRevert":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"biti", "description":"" }, "dummy":{ -- cgit v1.1 From a56dfe18582048189abaa86ae2873af1f228c0e6 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 30 Sep 2015 09:37:27 -0400 Subject: oops, fix to #756 needs this --- src/js/rpcreceiver.js | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/js/rpcreceiver.js diff --git a/src/js/rpcreceiver.js b/src/js/rpcreceiver.js new file mode 100644 index 0000000..995fd76 --- /dev/null +++ b/src/js/rpcreceiver.js @@ -0,0 +1,53 @@ +/******************************************************************************* + + uBlock Origin - a browser extension to block requests. + Copyright (C) 2015 Raymond Hill + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see {http://www.gnu.org/licenses/}. + + Home: https://github.com/gorhill/uBlock +*/ + +/* global vAPI, µBlock */ + +/******************************************************************************/ + +(function() { + +'use strict'; + +/******************************************************************************/ + +if ( typeof vAPI.rpcReceiver !== 'object' ) { + return; +} + +/******************************************************************************/ + +vAPI.rpcReceiver.getScriptTagFilters = function(details) { + var µb = µBlock; + var cfe = µb.cosmeticFilteringEngine; + if ( !cfe ) { return; } + var hostname = details.hostname; + return cfe.retrieveScriptTagRegex( + µb.URI.domainFromHostname(hostname) || hostname, + hostname + ); +}; + +/******************************************************************************/ + +})(); + +/******************************************************************************/ -- cgit v1.1 From 6b9848cf0d87b25178b54022c072e9f584578089 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 30 Sep 2015 10:17:25 -0400 Subject: Exception script tag filter makes no sense: reject such filters --- src/js/cosmetic-filtering.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index 1a0c873..d66c2b8 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -267,6 +267,7 @@ FilterParser.prototype.parse = function(s) { // Remember original string this.prefix = matches[1]; this.suffix = matches[3]; + this.unhide = matches[2].charAt(1) === '@' ? 1 : 0; // 2014-05-23: // https://github.com/gorhill/httpswitchboard/issues/260 @@ -288,8 +289,9 @@ FilterParser.prototype.parse = function(s) { // overhead in the content script. // Example: focus.de##script:contains(/uabInject/) if ( this.suffix.charAt(0) === 's' && this.reScriptContains.test(this.suffix) ) { - // Currently supported only as non-generic selector. - if ( this.prefix.length === 0 ) { + // Currently supported only as non-generic selector. Also, exception + // script tag filter makes no sense, ignore. + if ( this.prefix.length === 0 || this.unhide === 1 ) { this.invalid = true; return this; } @@ -302,7 +304,6 @@ FilterParser.prototype.parse = function(s) { } } - this.unhide = matches[2].charAt(1) === '@' ? 1 : 0; if ( this.prefix !== '' ) { this.hostnames = this.prefix.split(/\s*,\s*/); } -- cgit v1.1 From 70b4d3e037bf69d29e919207256038d4aa6098a2 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 30 Sep 2015 11:25:18 -0400 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 10e09ca..6f88485 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ Feel free to read [about the extension's required permissions](https://github.co #### Chromium -You can install the latest version [manually](https://github.com/gorhill/uBlock/tree/master/dist#install), from the [Chrome Store](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm), or from the [Opera store](https://addons.opera.com/en-gb/extensions/details/ublock/). +You can install the latest version [manually](https://github.com/gorhill/uBlock/tree/master/dist#install), from the [Chrome Store](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm), or from the [Opera store](https://addons.opera.com/en-gb/extensions/details/ublock/) (uBlock Origin is pusblished under the name "µBlock" in the Opera store -- the name can't be changed). #### Firefox / Firefox for Android -- cgit v1.1 From 0a6331e7befdfdcfdbf0dd3cf4f4fc397303aa0e Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 2 Oct 2015 09:34:09 -0400 Subject: translation work from https://crowdin.com/project/ublock --- src/_locales/ar/messages.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_locales/ar/messages.json b/src/_locales/ar/messages.json index 1d9dba5..69462dd 100644 --- a/src/_locales/ar/messages.json +++ b/src/_locales/ar/messages.json @@ -236,7 +236,7 @@ "description":"English: Parse and enforce Adblock+ element hiding filters." }, "3pParseAllABPHideFiltersInfo":{ - "message":"هذا الخيار يفعل تحليل وتطبيق فلاتر Adblock Plus-compatible “element hiding” filters<\/a> هذي الفلاتر مخصصه للتجميل الصفحه. هذي الفلاتر تخفي بعض صناديق او اعلانات المزعجه التي لا يمنعها محرك الفلاتر تفعيل هذي الخاصيه سوف يجعل الاضافه تستعمل الذاكره اكثر", + "message":"

هذا الخيار يمكّن من تحليل و تفعيل فلاتر متطابقة مع فلاتر ”إخفاء العناصر“ لتطبيق Adblock Plus<\/a>. هذه الفلاتر جماليّة بالأساس، تهدف إلى إخفاء عناصر في صفحة واب، تعتبر إزعاجا بصريّا، قد لا يتمكّن محرّك فلاتر الرّوابط من كشفها و صدّها.<\/p>

تفعيل هذا الخيار من شأنه زيادة أثر uBlock₀ على الذّاكرة.<\/p>", "description":"This option enables the parsing and enforcing of Adblock Plus-compatible 'element hiding' filters. These filters are essentially cosmetic, they serve to hide elements in a web page which are deemed to be a visual nuisance, and which can't be blocked by the net request-based filtering engine.\n\nEnabling this feature increases uBlock Origin's memory footprint." }, "3pListsOfBlockedHostsHeader":{ @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"دون معلمات", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"بايت", "description":"" }, "dummy":{ -- cgit v1.1 From 987da1960cd84c2651f7963bd91791209aa9f483 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 2 Oct 2015 09:34:53 -0400 Subject: updated comment --- src/js/cosmetic-filtering.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index d66c2b8..8969fce 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -287,7 +287,9 @@ FilterParser.prototype.parse = function(s) { // Script tag filters: pre-process them so that can be used with minimal // overhead in the content script. - // Example: focus.de##script:contains(/uabInject/) + // Examples: + // focus.de##script:contains(/uabInject/) + // focus.de##script:contains(uabInject) if ( this.suffix.charAt(0) === 's' && this.reScriptContains.test(this.suffix) ) { // Currently supported only as non-generic selector. Also, exception // script tag filter makes no sense, ignore. -- cgit v1.1 From 462912d399bcd4d3b6eafb4109e8ba1f63a6fe96 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 2 Oct 2015 11:51:30 -0400 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f88485..b796d07 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ Feel free to read [about the extension's required permissions](https://github.co #### Chromium -You can install the latest version [manually](https://github.com/gorhill/uBlock/tree/master/dist#install), from the [Chrome Store](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm), or from the [Opera store](https://addons.opera.com/en-gb/extensions/details/ublock/) (uBlock Origin is pusblished under the name "µBlock" in the Opera store -- the name can't be changed). +You can install the latest version [manually](https://github.com/gorhill/uBlock/tree/master/dist#install), from the [Chrome Store](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm), or from the [Opera store](https://addons.opera.com/en-gb/extensions/details/ublock/) (uBlock Origin is published under the name "µBlock" in the Opera store -- the name can't be changed). #### Firefox / Firefox for Android -- cgit v1.1 From ae47c5d4daecafe6751adf9e25bce182cbf0de26 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 2 Oct 2015 12:21:44 -0400 Subject: this fixes #773 --- src/settings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.html b/src/settings.html index 25bd7d6..49037e9 100644 --- a/src/settings.html +++ b/src/settings.html @@ -20,7 +20,7 @@

  • -- cgit v1.1 From 95037276c89a2ecae4af67e0b8dac24a0bf84680 Mon Sep 17 00:00:00 2001 From: Jan Seeger Date: Sat, 3 Oct 2015 14:24:00 +0200 Subject: Added Conkeror to the list of supported platforms. uBlock Origins runs well in Conkeror, an emacs-inspired browser. This patch makes it possible to install the plugin directly, without having to modify the install.rdf file. --- platform/firefox/install.rdf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform/firefox/install.rdf b/platform/firefox/install.rdf index 42ec05a..e63f4c4 100644 --- a/platform/firefox/install.rdf +++ b/platform/firefox/install.rdf @@ -50,5 +50,14 @@ 26.* + + + + + {a79fe89b-6662-4ff4-8e88-09950ad4dfde} + 0.1 + 9.9 + + -- cgit v1.1 From e40e2345f986f70174539c71f201b746f5098ce1 Mon Sep 17 00:00:00 2001 From: Jan Seeger Date: Sat, 3 Oct 2015 15:18:22 +0200 Subject: Tab fixes, broken XML fixes. Replaced tabs with spaces, added missing namespace for Description element. --- platform/firefox/install.rdf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/platform/firefox/install.rdf b/platform/firefox/install.rdf index e63f4c4..69f1074 100644 --- a/platform/firefox/install.rdf +++ b/platform/firefox/install.rdf @@ -13,7 +13,7 @@ true true 2 -{localized} + {localized} @@ -51,13 +51,13 @@ - - - - {a79fe89b-6662-4ff4-8e88-09950ad4dfde} - 0.1 - 9.9 - - + + + + {a79fe89b-6662-4ff4-8e88-09950ad4dfde} + 0.1 + 9.9 + + -- cgit v1.1 From e27151d4d71583d66da8a82519234dae93d7c1a6 Mon Sep 17 00:00:00 2001 From: Jan Seeger Date: Sat, 3 Oct 2015 15:35:56 +0200 Subject: Added double braces to application ID. --- platform/firefox/install.rdf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/firefox/install.rdf b/platform/firefox/install.rdf index 69f1074..ab9c737 100644 --- a/platform/firefox/install.rdf +++ b/platform/firefox/install.rdf @@ -54,7 +54,7 @@ - {a79fe89b-6662-4ff4-8e88-09950ad4dfde} + {{a79fe89b-6662-4ff4-8e88-09950ad4dfde}} 0.1 9.9 -- cgit v1.1 From 2ed90e1993c8529b4dee8a870de0e34e1b7dbd09 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 3 Oct 2015 09:44:23 -0400 Subject: convert hard tabs to soft tabs --- platform/firefox/install.rdf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/firefox/install.rdf b/platform/firefox/install.rdf index ab9c737..c0332ff 100644 --- a/platform/firefox/install.rdf +++ b/platform/firefox/install.rdf @@ -13,7 +13,7 @@ true true 2 - {localized} +{localized} @@ -54,9 +54,9 @@ - {{a79fe89b-6662-4ff4-8e88-09950ad4dfde}} - 0.1 - 9.9 + {{a79fe89b-6662-4ff4-8e88-09950ad4dfde}} + 0.1 + 9.9 -- cgit v1.1 From c96d0a7effcacc4d660b4cf4e24a098c44fbd056 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 3 Oct 2015 09:46:45 -0400 Subject: info accuracy in comment --- platform/chromium/vapi-background.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 79d929e..853accb 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -1017,7 +1017,7 @@ vAPI.cloud = (function() { // Mind chrome.storage.sync.QUOTA_BYTES_PER_ITEM (8192 at time of writing) var maxChunkSize = Math.floor(chrome.storage.sync.QUOTA_BYTES_PER_ITEM * 0.75); - // Mind chrome.storage.sync.QUOTA_BYTES_PER_ITEM (8192 at time of writing) + // Mind chrome.storage.sync.QUOTA_BYTES (128 kB at time of writing) var maxStorageSize = chrome.storage.sync.QUOTA_BYTES; var options = { @@ -1029,8 +1029,8 @@ vAPI.cloud = (function() { // We "poll" at specific index in order to get a rough idea of how // large is the stored string. // This allows reading a single item with only 2 sync operations -- a - // good thing given chrome.storage.syncMAX_WRITE_OPERATIONS_PER_MINUTE - // and chrome.storage.syncMAX_WRITE_OPERATIONS_PER_HOUR. + // good thing given chrome.storage.sync.MAX_WRITE_OPERATIONS_PER_MINUTE + // and chrome.storage.sync.MAX_WRITE_OPERATIONS_PER_HOUR. var getCoarseChunkCount = function(dataKey, callback) { var bin = {}; @@ -1085,7 +1085,7 @@ vAPI.cloud = (function() { bin.size = JSON.stringify(bin).length; var item = JSON.stringify(bin); - // Chunkify taking into account QUOTA_BYTES_PER_ITEM: + // Chunkify taking into account QUOTA_BYTES_PER_ITEM: // https://developer.chrome.com/extensions/storage#property-sync // "The maximum size (in bytes) of each individual item in sync // "storage, as measured by the JSON stringification of its value -- cgit v1.1 From 371670802bc2917fd2946063eb5a7393205b7b54 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 3 Oct 2015 10:28:53 -0400 Subject: this fixes #695 --- src/1p-filters.html | 2 +- src/css/dashboard-common.css | 6 ++++++ src/css/settings.css | 6 ------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/1p-filters.html b/src/1p-filters.html index 0c5d01c..37e8161 100644 --- a/src/1p-filters.html +++ b/src/1p-filters.html @@ -13,7 +13,7 @@
    -

    +

    diff --git a/src/css/dashboard-common.css b/src/css/dashboard-common.css index b291720..b23e0ca 100644 --- a/src/css/dashboard-common.css +++ b/src/css/dashboard-common.css @@ -15,6 +15,12 @@ h3 { a { text-decoration: none; } +a.info { + color: #ccc; + } +a.info:hover { + color: #444; + } button { padding: 0.33em; } diff --git a/src/css/settings.css b/src/css/settings.css index 48ba84a..308334f 100644 --- a/src/css/settings.css +++ b/src/css/settings.css @@ -11,12 +11,6 @@ ul#userSettings, ul#userSettings ul { list-style-type: none; } -ul#userSettings a.info { - color: #ccc; - } -ul#userSettings a.info:hover { - color: #444; - } ul#userSettings .subgroup { margin-top: 1em; } -- cgit v1.1 From f0b65eb6e8c8201b20ed70b91703937adf7a79c2 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 4 Oct 2015 00:09:08 -0400 Subject: this fixes #780 --- assets/checksums.txt | 2 +- assets/ublock/unbreak.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 6bc3584..a9a99ab 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,4 +1,4 @@ -3c418039a26f4f9c4b43a1e843b1208e assets/ublock/unbreak.txt +c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt effa803f2fae1dd1fca06f19563fbac6 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt diff --git a/assets/ublock/unbreak.txt b/assets/ublock/unbreak.txt index 3398288..6e9c196 100644 --- a/assets/ublock/unbreak.txt +++ b/assets/ublock/unbreak.txt @@ -219,3 +219,8 @@ ovh.strim.io#@##tweets # https://forums.lanik.us/viewtopic.php?f=64&t=24764 @@/b/ss/*&aqe=$image,domain=aeroplan.com + +# https://github.com/gorhill/uBlock/issues/780 +@@||www.google-analytics.com/plugins/ua/linkid.js$script,domain=support.amd.com +@@||www.google-analytics.com/analytics.js$script,domain=support.amd.com +@@||www.googletagmanager.com/gtm.js$script,domain=support.amd.com -- cgit v1.1 From a92c8f14134edb9a158b0c3f005a59fa4c6b55d5 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 4 Oct 2015 13:27:05 -0400 Subject: re. #781: backward compatibility code to ignore unsupported explicit style properties --- src/js/cosmetic-filtering.js | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index 8969fce..3ef45d4 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -230,21 +230,19 @@ FilterEntity.fromSelfie = function(s) { /******************************************************************************/ var FilterParser = function() { - this.prefix = ''; - this.suffix = ''; + this.prefix = this.suffix = this.style = ''; this.unhide = 0; this.hostnames = []; this.invalid = false; this.cosmetic = true; - this.reParser = /^\s*([^#]*)(##|#@#)(.+)\s*$/; + this.reParser = /^([^#]*?)(##|#@#)(.+)$/; this.reScriptContains = /^script:contains\(.+?\)$/; }; /******************************************************************************/ FilterParser.prototype.reset = function() { - this.prefix = ''; - this.suffix = ''; + this.prefix = this.suffix = this.style = ''; this.unhide = 0; this.hostnames.length = 0; this.invalid = false; @@ -263,11 +261,20 @@ FilterParser.prototype.parse = function(s) { this.cosmetic = false; return this; } - - // Remember original string - this.prefix = matches[1]; - this.suffix = matches[3]; + this.prefix = matches[1].trim(); this.unhide = matches[2].charAt(1) === '@' ? 1 : 0; + this.suffix = matches[3].trim(); + + // Cosmetic filters with explicit style properties can apply only: + // - to specific cosmetic filters (those which apply to a specific site) + // - to block cosmetic filters (not exception cosmetic filters) + if ( this.suffix.slice(-1) === '}' ) { + // Not supported for now: this code will ensure some backward + // compatibility for when cosmetic filters with explicit style + // properties start to be in use. + this.invalid = true; + return this; + } // 2014-05-23: // https://github.com/gorhill/httpswitchboard/issues/260 @@ -285,6 +292,10 @@ FilterParser.prototype.parse = function(s) { this.suffix = this.suffix.slice(1); } + if ( this.prefix !== '' ) { + this.hostnames = this.prefix.split(/\s*,\s*/); + } + // Script tag filters: pre-process them so that can be used with minimal // overhead in the content script. // Examples: @@ -293,7 +304,7 @@ FilterParser.prototype.parse = function(s) { if ( this.suffix.charAt(0) === 's' && this.reScriptContains.test(this.suffix) ) { // Currently supported only as non-generic selector. Also, exception // script tag filter makes no sense, ignore. - if ( this.prefix.length === 0 || this.unhide === 1 ) { + if ( this.hostnames.length === 0 || this.unhide === 1 ) { this.invalid = true; return this; } @@ -306,9 +317,6 @@ FilterParser.prototype.parse = function(s) { } } - if ( this.prefix !== '' ) { - this.hostnames = this.prefix.split(/\s*,\s*/); - } return this; }; -- cgit v1.1 From 4021cffaf92a3dbedc8d6f55d3ca9ed989dde36d Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 5 Oct 2015 09:02:45 -0400 Subject: translation work from https://crowdin.com/project/ublock --- dist/description/description-de.txt | 4 ++-- src/_locales/ca/messages.json | 4 ++-- src/_locales/de/messages.json | 16 ++++++++-------- src/_locales/el/messages.json | 4 ++-- src/_locales/fy/messages.json | 2 +- src/_locales/hi/messages.json | 4 ++-- src/_locales/id/messages.json | 4 ++-- src/_locales/it/messages.json | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dist/description/description-de.txt b/dist/description/description-de.txt index 22c3657..2134687 100644 --- a/dist/description/description-de.txt +++ b/dist/description/description-de.txt @@ -35,7 +35,7 @@ Ohne die vorgegebenen Filterlisten ist diese Erweiterung nichts. Wenn du also et *** Kostenlos. -Open source mit Public License (GPLv3) +Open-Source-Software unter der General Public License (GPLv3) Für Benutzer von Benutzern. Mitwirkende @ Github: https://github.com/gorhill/uBlock/graphs/contributors @@ -45,5 +45,5 @@ Mitwirkende @ Crowdin: https://crowdin.net/project/ublock Dies ist eine ziemlich frühe Version - bitte denke daran, wenn du sie bewertest. -Change log des Projekts: +Änderungsprotokoll: https://github.com/gorhill/uBlock/releases diff --git a/src/_locales/ca/messages.json b/src/_locales/ca/messages.json index 63e247f..fcc01a5 100644 --- a/src/_locales/ca/messages.json +++ b/src/_locales/ca/messages.json @@ -104,7 +104,7 @@ "description":"" }, "popup3pPassiveRulePrompt":{ - "message":"css\/images de tercers", + "message":"css\/imatges de tercers", "description":"" }, "popupInlineScriptRulePrompt":{ @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"sense paràmetres", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ diff --git a/src/_locales/de/messages.json b/src/_locales/de/messages.json index 3b9b0ec..b646607 100644 --- a/src/_locales/de/messages.json +++ b/src/_locales/de/messages.json @@ -164,7 +164,7 @@ "description":"English: Hide placeholders of blocked elements" }, "settingsIconBadgePrompt":{ - "message":"Zeige die Zahl der blockierten Anfragen auf dem Icon", + "message":"Zeige die Zahl der blockierten Anfragen auf dem Symbol", "description":"English: Show the number of blocked requests on the icon" }, "settingsContextMenuPrompt":{ @@ -196,7 +196,7 @@ "description":"English: " }, "settingsExperimentalPrompt":{ - "message":"Aktiviere experimentelle Features (About<\/a>)", + "message":"Aktiviere experimentelle Funktionen (About<\/a>)", "description":"English: Enable experimental features" }, "settingsStorageUsed":{ @@ -296,7 +296,7 @@ "description":"a filter list is 'out of date' (possibly needs to be updated)" }, "3pLastUpdate":{ - "message":"Letztes Update: {{ago}}", + "message":"Letzte Aktualisierung: {{ago}}", "description":"English: Last update: {{ago}}, where 'ago' will be replaced with something like '2 days ago'" }, "1pFormatHint":{ @@ -348,7 +348,7 @@ "description":"Will discard manually-edited content and exit manual-edit mode" }, "rulesImport":{ - "message":"Aus Datei importieren...", + "message":"Aus Datei importieren …", "description":"" }, "rulesExport":{ @@ -380,7 +380,7 @@ "description":"English: Export" }, "whitelistExportFilename":{ - "message":"my-ublock-whitelist_{{datetime}}.txt", + "message":"meine-ublock-whitelist_{{datetime}}.txt", "description":"English: my-ublock-whitelist_{{datetime}}.txt" }, "whitelistApply":{ @@ -492,7 +492,7 @@ "description":"English: Contributors" }, "aboutBackupDataButton":{ - "message":"Backup in eine Datei...", + "message":"Backup in eine Datei", "description":"English: Backup to file" }, "aboutBackupFilename":{ @@ -500,11 +500,11 @@ "description":"English: my-ublock-backup_{{datetime}}.txt" }, "aboutRestoreDataButton":{ - "message":"Aus einer Datei wiederherstellen...", + "message":"Aus einer Datei wiederherstellen ...", "description":"English: Restore from file..." }, "aboutResetDataButton":{ - "message":"Fange von ganz vorne an...", + "message":"Auf Vorgaben zurücksetzen …", "description":"English: Reset to default settings..." }, "aboutRestoreDataConfirm":{ diff --git a/src/_locales/el/messages.json b/src/_locales/el/messages.json index 18f15bb..6d249fb 100644 --- a/src/_locales/el/messages.json +++ b/src/_locales/el/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"χωρίς παραμέτρους", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -616,7 +616,7 @@ "description":"used as a prompt for the user to provide a custom device name" }, "genericSubmit":{ - "message":"Submit", + "message":"Υποβολή", "description":"for generic 'submit' buttons" }, "genericRevert":{ diff --git a/src/_locales/fy/messages.json b/src/_locales/fy/messages.json index 0960c1b..0d14cf8 100644 --- a/src/_locales/fy/messages.json +++ b/src/_locales/fy/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"sûnder parameters", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ diff --git a/src/_locales/hi/messages.json b/src/_locales/hi/messages.json index c9596fb..af38aca 100644 --- a/src/_locales/hi/messages.json +++ b/src/_locales/hi/messages.json @@ -620,11 +620,11 @@ "description":"for generic 'submit' buttons" }, "genericRevert":{ - "message":"Revert", + "message":"पलटदे", "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"बाइट्स", "description":"" }, "dummy":{ diff --git a/src/_locales/id/messages.json b/src/_locales/id/messages.json index bc5bcb3..6acc82e 100644 --- a/src/_locales/id/messages.json +++ b/src/_locales/id/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"tanpa parameter", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"byte", "description":"" }, "dummy":{ diff --git a/src/_locales/it/messages.json b/src/_locales/it/messages.json index 7087921..726381c 100644 --- a/src/_locales/it/messages.json +++ b/src/_locales/it/messages.json @@ -516,7 +516,7 @@ "description":"Message to display when an error occurred during restore" }, "aboutResetDataConfirm":{ - "message":"Verranno cancellate tutte le impostazioni, e uBlock sarà riavviato.\n\nResettare uBlock alle impostazioni di fabbrica?", + "message":"Verranno cancellate tutte le impostazioni, e uBlock₀ sarà riavviato.\n\nResettare uBlock alle impostazioni di fabbrica?", "description":"Message asking user to confirm reset" }, "errorCantConnectTo":{ @@ -564,7 +564,7 @@ "description":"Firefox-specific: appears as 'uBlock₀ (off)'" }, "docblockedPrompt1":{ - "message":"uBlock ha impedito alla seguente pagina di caricarsi:", + "message":"uBlock₀ ha impedito alla seguente pagina di caricarsi:", "description":"English: uBlock₀ has prevented the following page from loading:" }, "docblockedPrompt2":{ -- cgit v1.1 From 3a4abc83d520e01791106c81cde70e235fe6d386 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 5 Oct 2015 09:05:00 -0400 Subject: preparing for next release --- platform/chromium/manifest.json | 2 +- platform/opera/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index 9aa67ab..77d8beb 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.1.2", + "version": "1.2.0", "default_locale": "en", "description": "__MSG_extShortDesc__", diff --git a/platform/opera/manifest.json b/platform/opera/manifest.json index a556d4a..d2c481e 100644 --- a/platform/opera/manifest.json +++ b/platform/opera/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.1.2", + "version": "1.2.0", "default_locale": "en", "description": "__MSG_extShortDesc__", -- cgit v1.1 From 8f4ee3e34d35478bf6040f14620d9e3d79870019 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 5 Oct 2015 10:58:24 -0400 Subject: support for `genericblock` filter option () --- src/js/static-net-filtering.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index 92cc7af..d593acf 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -1454,7 +1454,10 @@ FilterParser.prototype.parseOptions = function(s) { this.parseOptParty(false, not); continue; } - if ( opt === 'elemhide' ) { + // https://issues.adblockplus.org/ticket/647 + // `genericblock` concept already supported, just a matter of + // adding support for the new keyword. + if ( opt === 'elemhide' || opt === 'genericblock' ) { if ( this.action === AllowAction ) { this.parseOptType('elemhide', false); this.action = BlockAction; -- cgit v1.1 From 054ba17c963d62b8fa9aebd8859c46635c374789 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 5 Oct 2015 11:03:20 -0400 Subject: oops, mixed up ABP issues: it\'s rather from https://issues.adblockplus.org/ticket/616 --- src/js/static-net-filtering.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index d593acf..0e00f0b 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -1454,10 +1454,10 @@ FilterParser.prototype.parseOptions = function(s) { this.parseOptParty(false, not); continue; } - // https://issues.adblockplus.org/ticket/647 + // https://issues.adblockplus.org/ticket/616 // `genericblock` concept already supported, just a matter of // adding support for the new keyword. - if ( opt === 'elemhide' || opt === 'genericblock' ) { + if ( opt === 'elemhide' || opt === 'generichide' ) { if ( this.action === AllowAction ) { this.parseOptType('elemhide', false); this.action = BlockAction; -- cgit v1.1 From 19a717b4b61aa8d77c0d189e1fb86c3e7e19e128 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 5 Oct 2015 11:04:36 -0400 Subject: comment... --- src/js/static-net-filtering.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index 0e00f0b..6bbf13a 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -1455,7 +1455,7 @@ FilterParser.prototype.parseOptions = function(s) { continue; } // https://issues.adblockplus.org/ticket/616 - // `genericblock` concept already supported, just a matter of + // `generichide` concept already supported, just a matter of // adding support for the new keyword. if ( opt === 'elemhide' || opt === 'generichide' ) { if ( this.action === AllowAction ) { -- cgit v1.1 From bea19110dbbddfffd6b518baf6751b1a0d8a273e Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 6 Oct 2015 08:10:45 -0400 Subject: add info link for cloud storage in Settings pane --- src/settings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.html b/src/settings.html index 49037e9..3c35353 100644 --- a/src/settings.html +++ b/src/settings.html @@ -15,7 +15,7 @@

  • -
  • +
    • -- cgit v1.1 From fb146ef3b34218a0c5f21208eaa68f8ee7921a86 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 6 Oct 2015 14:07:18 -0400 Subject: to deal with new arstechnica.com ad until fix is in EasyList --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index a9a99ab..dab0689 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -effa803f2fae1dd1fca06f19563fbac6 assets/ublock/filters.txt +c381c2ac1d7deb613a265e09b096de65 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 0f08fdf..fe64baa 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -143,3 +143,6 @@ jeu.info###page [class^="banniere-"] # Until fixed in EasyPrivacy @@||eplayerhtml5.performgroup.com/js/tsEplayerHtml5/js/Eplayer/js/quantcast/quant.js$script,first-party @@||eplayerhtml5.performgroup.com/js/tsEplayerHtml5/js/Eplayer/js/quantcast/vquant.js$script,first-party + +# http://arstechnica.com/civis/viewtopic.php?f=3&t=1296357 +arstechnica.com###lg-pushdown -- cgit v1.1 From 9cf433e58530c9f9bb0f791807429debaa178040 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 6 Oct 2015 14:13:47 -0400 Subject: translation work from https://crowdin.com/project/ublock --- src/_locales/te/messages.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_locales/te/messages.json b/src/_locales/te/messages.json index 9613669..d85dbc0 100644 --- a/src/_locales/te/messages.json +++ b/src/_locales/te/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"పారామితులు లేని", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"బైట్లు", "description":"" }, "dummy":{ -- cgit v1.1 From 4077bd3cd21c70d94c7c2f86650324fb5170afae Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 7 Oct 2015 08:27:07 -0400 Subject: start the use of inline script tag filters --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index dab0689..51bb65a 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -c381c2ac1d7deb613a265e09b096de65 assets/ublock/filters.txt +a1a8ba0d8a1b75d19f445ac5cf1d69fa assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index fe64baa..bf0a949 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -146,3 +146,11 @@ jeu.info###page [class^="banniere-"] # http://arstechnica.com/civis/viewtopic.php?f=3&t=1296357 arstechnica.com###lg-pushdown + +# Useful inline script tag filters until filter list maintainers start to use +# it in their respective filter lists +arstechnica.com##script:contains(ars.READY.push) +dayt.se##script:contains(adBlockDetected) +explosm.net##script:contains(/^__durl=/) +focus.de.de##script:contains(uabInject) +rp-online.de##script:contains(uabInject) -- cgit v1.1 From 45d29d44e52171a4fef504bf9bbaa7b245858f36 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 7 Oct 2015 08:35:41 -0400 Subject: fixed typo in last commit --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 51bb65a..c30434e 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -a1a8ba0d8a1b75d19f445ac5cf1d69fa assets/ublock/filters.txt +26ceda7cbfed3f0457d1dd906ffd3429 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index bf0a949..1fd8a33 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -152,5 +152,5 @@ arstechnica.com###lg-pushdown arstechnica.com##script:contains(ars.READY.push) dayt.se##script:contains(adBlockDetected) explosm.net##script:contains(/^__durl=/) -focus.de.de##script:contains(uabInject) +focus.de##script:contains(uabInject) rp-online.de##script:contains(uabInject) -- cgit v1.1 From a90d9653b5fc9e68620ae2f7867afdec7d721df4 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 7 Oct 2015 09:11:16 -0400 Subject: apparently WP filters no longer needed --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index c30434e..dce85bf 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -26ceda7cbfed3f0457d1dd906ffd3429 assets/ublock/filters.txt +bedded513e6cb074a6d4962b78bfd721 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 1fd8a33..5979fda 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -117,11 +117,6 @@ speedtest.net###swiffycontainer canvas # https://github.com/gorhill/uBlock/issues/651 ink361.com##.getridofAdsBlock[href^="javascript:"] -# washingtonpost.com -||js.washingtonpost.com/wpost*/js/combo$script,first-party -www.washingtonpost.com###drawbridge-signup-overlay -www.washingtonpost.com##.jqmOverlay - # https://www.reddit.com/r/techsupport/comments/3kyd0m/sponsored_content_ads_that_only_show_up_with/ explosm.net##.inner-wrap > .row > .columns.large-4.medium-12.small-12 explosm.net##.inner-wrap > .row > .columns.large-8.medium-12 > hr + div:not(.row) @@ -154,3 +149,4 @@ dayt.se##script:contains(adBlockDetected) explosm.net##script:contains(/^__durl=/) focus.de##script:contains(uabInject) rp-online.de##script:contains(uabInject) +tweaktown.com##script:contains(adBlockNotDetected) -- cgit v1.1 From dbd968e952785c89fa16cde5ae37abe2e2e1664c Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 7 Oct 2015 09:22:42 -0400 Subject: prevent spurious redirection on WP --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index dce85bf..da29f6e 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -bedded513e6cb074a6d4962b78bfd721 assets/ublock/filters.txt +28369fdabb57af5be776bd7e931c02dc assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 5979fda..031c966 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -142,6 +142,9 @@ jeu.info###page [class^="banniere-"] # http://arstechnica.com/civis/viewtopic.php?f=3&t=1296357 arstechnica.com###lg-pushdown +# This prevents spurious redirection, but breaks comments +||js.washingtonpost.com/wpost/js/combo?*/util/util.identity-management-1.1.0.js$script,first-party + # Useful inline script tag filters until filter list maintainers start to use # it in their respective filter lists arstechnica.com##script:contains(ars.READY.push) -- cgit v1.1 From debb1f60a1f220419ed05c9d07f52d71950e1693 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 7 Oct 2015 09:28:36 -0400 Subject: remove filter added by mistake --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index da29f6e..7ea76d9 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -28369fdabb57af5be776bd7e931c02dc assets/ublock/filters.txt +4a2e49d2f7ac206d5223343a448a36ff assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 031c966..938cb96 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -152,4 +152,3 @@ dayt.se##script:contains(adBlockDetected) explosm.net##script:contains(/^__durl=/) focus.de##script:contains(uabInject) rp-online.de##script:contains(uabInject) -tweaktown.com##script:contains(adBlockNotDetected) -- cgit v1.1 From 097489b4e0bd7fb544848e54fe1f0ebeca979631 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 8 Oct 2015 11:15:58 -0400 Subject: new revision --- platform/chromium/manifest.json | 2 +- platform/firefox/frameModule.js | 5 +++-- platform/opera/manifest.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index 77d8beb..3989e98 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.2.0", + "version": "1.2.1", "default_locale": "en", "description": "__MSG_extShortDesc__", diff --git a/platform/firefox/frameModule.js b/platform/firefox/frameModule.js index 98fc107..37de2b5 100644 --- a/platform/firefox/frameModule.js +++ b/platform/firefox/frameModule.js @@ -23,6 +23,7 @@ /******************************************************************************/ +// https://github.com/gorhill/uBlock/issues/800 this.EXPORTED_SYMBOLS = ['contentObserver', 'LocationChangeListener']; const {interfaces: Ci, utils: Cu} = Components; @@ -62,7 +63,7 @@ const getMessageManager = function(win) { /******************************************************************************/ -const contentObserver = { +var contentObserver = { classDescription: 'content-policy for ' + hostName, classID: Components.ID('{7afbd130-cbaf-46c2-b944-f5d24305f484}'), contractID: '@' + hostName + '/content-policy;1', @@ -423,7 +424,7 @@ const contentObserver = { const locationChangedMessageName = hostName + ':locationChanged'; -const LocationChangeListener = function(docShell) { +var LocationChangeListener = function(docShell) { if ( !docShell ) { return; } diff --git a/platform/opera/manifest.json b/platform/opera/manifest.json index d2c481e..221d7e0 100644 --- a/platform/opera/manifest.json +++ b/platform/opera/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.2.0", + "version": "1.2.1", "default_locale": "en", "description": "__MSG_extShortDesc__", -- cgit v1.1 From aeed41bdfd990888e6cfdf30709632f0c65c6fd2 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 8 Oct 2015 12:23:13 -0400 Subject: inline script tag filter to counter self-defacement on wetteronline.de --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 7ea76d9..2798037 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -4a2e49d2f7ac206d5223343a448a36ff assets/ublock/filters.txt +15784a5df2016b079235483134dad138 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 938cb96..91474ab 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -152,3 +152,4 @@ dayt.se##script:contains(adBlockDetected) explosm.net##script:contains(/^__durl=/) focus.de##script:contains(uabInject) rp-online.de##script:contains(uabInject) +wetteronline.de##script:contains(uabInject) -- cgit v1.1 From d9b3a1de19354003a2d826e8997c0ebd1f4af2e4 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 8 Oct 2015 12:26:28 -0400 Subject: inline script tag filter to counter self-defacement on wetter.de --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 2798037..b40bbfc 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -15784a5df2016b079235483134dad138 assets/ublock/filters.txt +3300f3396088c2b86ffaff40966f7726 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 91474ab..a1a9791 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -152,4 +152,5 @@ dayt.se##script:contains(adBlockDetected) explosm.net##script:contains(/^__durl=/) focus.de##script:contains(uabInject) rp-online.de##script:contains(uabInject) +wetter.com##script:contains(uabInject) wetteronline.de##script:contains(uabInject) -- cgit v1.1 From 7501447cace6832ee8b8423689ac989cc914bcdc Mon Sep 17 00:00:00 2001 From: Manuel Reimer Date: Thu, 8 Oct 2015 19:15:00 +0200 Subject: Added basic Thunderbird support --- platform/firefox/install.rdf | 9 +++++++++ platform/firefox/vapi-background.js | 26 ++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/platform/firefox/install.rdf b/platform/firefox/install.rdf index c0332ff..07b107f 100644 --- a/platform/firefox/install.rdf +++ b/platform/firefox/install.rdf @@ -59,5 +59,14 @@ 9.9 + + + + + {{3550f703-e582-4d05-9a08-453d09bdfdc6}} + 38.3 + 45.0 + + diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 8bc110b..d8a528d 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -40,6 +40,7 @@ const {Services} = Cu.import('resource://gre/modules/Services.jsm', null); var vAPI = self.vAPI = self.vAPI || {}; vAPI.firefox = true; vAPI.fennec = Services.appinfo.ID === '{aa3c5121-dab2-40e2-81ca-7ea25febc110}'; +vAPI.thunderbird = Services.appinfo.ID === '{3550f703-e582-4d05-9a08-453d09bdfdc6}'; /******************************************************************************/ @@ -524,7 +525,10 @@ vAPI.storage = (function() { /******************************************************************************/ var getTabBrowser = function(win) { - return vAPI.fennec && win.BrowserApp || win.gBrowser || null; + return vAPI.fennec && win.BrowserApp || + vAPI.thunderbird && win.document.getElementById('tabmail') || + win.gBrowser || + null; }; /******************************************************************************/ @@ -729,7 +733,7 @@ vAPI.tabs.open = function(details) { } } - var win = Services.wm.getMostRecentWindow('navigator:browser'); + var win = Services.wm.getMostRecentWindow(vAPI.thunderbird && 'mail:3pane' || 'navigator:browser'); var tabBrowser = getTabBrowser(win); if ( vAPI.fennec ) { @@ -750,6 +754,12 @@ vAPI.tabs.open = function(details) { return; } + if ( vAPI.thunderbird ) { + tabBrowser.openTab('contentTab', { contentPage: details.url, background: !details.active }); + // TODO: Should be possible to move tabs on Thunderbird + return; + } + if ( details.index === -1 ) { details.index = tabBrowser.browsers.indexOf(tabBrowser.selectedBrowser) + 1; } @@ -876,6 +886,9 @@ var tabWatcher = (function() { var tabIdGenerator = 1; var indexFromBrowser = function(browser) { + if (vAPI.thunderbird) // TODO: Add support for this + return -1; + var win = getOwnerWindow(browser); if ( !win ) { return -1; @@ -966,13 +979,18 @@ var tabWatcher = (function() { }; var currentBrowser = function() { - var win = Services.wm.getMostRecentWindow('navigator:browser'); + var win = Services.wm.getMostRecentWindow(vAPI.thunderbird && 'mail:3pane' || 'navigator:browser'); // https://github.com/gorhill/uBlock/issues/399 // getTabBrowser() can return null at browser launch time. var tabBrowser = getTabBrowser(win); if ( tabBrowser === null ) { return null; } + if (vAPI.thunderbird) { + // Directly at startup the first tab may not be initialized + if (tabBrowser.tabInfo.length == 0) return null; + return tabBrowser.getBrowserForSelectedTab(); + } return browserFromTarget(tabBrowser.selectedTab); }; @@ -1186,7 +1204,7 @@ vAPI.setIcon = function(tabId, iconStatus, badge) { // If badge is undefined, then setIcon was called from the TabSelect event var win = badge === undefined ? iconStatus - : Services.wm.getMostRecentWindow('navigator:browser'); + : vAPI.thunderbird && Services.wm.getMostRecentWindow('mail:3pane') || Services.wm.getMostRecentWindow('navigator:browser'); var curTabId = tabWatcher.tabIdFromTarget(getTabBrowser(win).selectedTab); var tb = vAPI.toolbarButton; -- cgit v1.1 From 91ecabf82ac8de2ca4e76d584794957a2b4df489 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 8 Oct 2015 17:44:21 -0400 Subject: code review --- platform/firefox/vapi-background.js | 76 ++++++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 22 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index d8a528d..5f3fce4 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -524,12 +524,23 @@ vAPI.storage = (function() { /******************************************************************************/ -var getTabBrowser = function(win) { - return vAPI.fennec && win.BrowserApp || - vAPI.thunderbird && win.document.getElementById('tabmail') || - win.gBrowser || - null; -}; +var getTabBrowser = (function() { + if ( vAPI.fennec ) { + return function(win) { + return win.BrowserApp || null; + }; + } + + if ( vAPI.thunderbird ) { + return function(win) { + win.document.getElementById('tabmail'); + }; + } + + return function(win) { + return win.gBrowser || null; + }; +})(); /******************************************************************************/ @@ -562,6 +573,16 @@ vAPI.noTabId = '-1'; vAPI.tabs = {}; + +/******************************************************************************/ + +vAPI.tabs.mostRecentWindowId = (function() { + if ( vAPI.thunderbird ) { + return 'mail:3pane'; + } + return 'navigator:browser'; +})(); + /******************************************************************************/ vAPI.tabs.registerListeners = function() { @@ -661,7 +682,7 @@ vAPI.tabs.getAll = function(window) { /******************************************************************************/ vAPI.tabs.getWindows = function() { - var winumerator = Services.wm.getEnumerator('navigator:browser'); + var winumerator = Services.wm.getEnumerator(this.mostRecentWindowId); var windows = []; while ( winumerator.hasMoreElements() ) { @@ -733,11 +754,13 @@ vAPI.tabs.open = function(details) { } } - var win = Services.wm.getMostRecentWindow(vAPI.thunderbird && 'mail:3pane' || 'navigator:browser'); + var win = Services.wm.getMostRecentWindow(this.mostRecentWindowId); var tabBrowser = getTabBrowser(win); if ( vAPI.fennec ) { - tabBrowser.addTab(details.url, {selected: details.active !== false}); + tabBrowser.addTab(details.url, { + selected: details.active !== false + }); // Note that it's impossible to move tabs on Fennec, so don't bother return; } @@ -755,7 +778,10 @@ vAPI.tabs.open = function(details) { } if ( vAPI.thunderbird ) { - tabBrowser.openTab('contentTab', { contentPage: details.url, background: !details.active }); + tabBrowser.openTab('contentTab', { + contentPage: details.url, + background: !details.active + }); // TODO: Should be possible to move tabs on Thunderbird return; } @@ -791,13 +817,16 @@ vAPI.tabs.replace = function(tabId, url) { /******************************************************************************/ -vAPI.tabs._remove = function(tab, tabBrowser) { +vAPI.tabs._remove = (function() { if ( vAPI.fennec ) { - tabBrowser.closeTab(tab); - return; + return function(tab, tabBrowser) { + tabBrowser.closeTab(tab); + }; } - tabBrowser.removeTab(tab); -}; + return function(tab, tabBrowser) { + tabBrowser.removeTab(tab); + }; +})(); /******************************************************************************/ @@ -886,9 +915,10 @@ var tabWatcher = (function() { var tabIdGenerator = 1; var indexFromBrowser = function(browser) { - if (vAPI.thunderbird) // TODO: Add support for this + // TODO: Add support for this + if ( vAPI.thunderbird ) { return -1; - + } var win = getOwnerWindow(browser); if ( !win ) { return -1; @@ -979,17 +1009,19 @@ var tabWatcher = (function() { }; var currentBrowser = function() { - var win = Services.wm.getMostRecentWindow(vAPI.thunderbird && 'mail:3pane' || 'navigator:browser'); + var win = Services.wm.getMostRecentWindow(vAPI.tabs.mostRecentWindowId); // https://github.com/gorhill/uBlock/issues/399 // getTabBrowser() can return null at browser launch time. var tabBrowser = getTabBrowser(win); if ( tabBrowser === null ) { return null; } - if (vAPI.thunderbird) { + if ( vAPI.thunderbird ) { // Directly at startup the first tab may not be initialized - if (tabBrowser.tabInfo.length == 0) return null; - return tabBrowser.getBrowserForSelectedTab(); + if ( tabBrowser.tabInfo.length === 0 ) { + return null; + } + return tabBrowser.getBrowserForSelectedTab() || null; } return browserFromTarget(tabBrowser.selectedTab); }; @@ -1204,7 +1236,7 @@ vAPI.setIcon = function(tabId, iconStatus, badge) { // If badge is undefined, then setIcon was called from the TabSelect event var win = badge === undefined ? iconStatus - : vAPI.thunderbird && Services.wm.getMostRecentWindow('mail:3pane') || Services.wm.getMostRecentWindow('navigator:browser'); + : Services.wm.getMostRecentWindow(vAPI.tabs.mostRecentWindowId); var curTabId = tabWatcher.tabIdFromTarget(getTabBrowser(win).selectedTab); var tb = vAPI.toolbarButton; -- cgit v1.1 From d4d7ae4225c617dcee96dea0228e951afe2648ee Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 9 Oct 2015 07:34:30 -0400 Subject: interim version for dev build --- platform/chromium/manifest.json | 2 +- platform/opera/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index 3989e98..c0e13c5 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.2.1", + "version": "1.2.2", "default_locale": "en", "description": "__MSG_extShortDesc__", diff --git a/platform/opera/manifest.json b/platform/opera/manifest.json index 221d7e0..24b6cac 100644 --- a/platform/opera/manifest.json +++ b/platform/opera/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.2.1", + "version": "1.2.2", "default_locale": "en", "description": "__MSG_extShortDesc__", -- cgit v1.1 From dc2dc3753d7f421854f5bc07aeeb2e6bba95b2dc Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 9 Oct 2015 07:40:49 -0400 Subject: this should fix AMO validator error --- platform/firefox/install.rdf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/firefox/install.rdf b/platform/firefox/install.rdf index 07b107f..034679a 100644 --- a/platform/firefox/install.rdf +++ b/platform/firefox/install.rdf @@ -64,7 +64,7 @@ {{3550f703-e582-4d05-9a08-453d09bdfdc6}} - 38.3 + 38.3.0 45.0 -- cgit v1.1 From 2d0ed21544230e665a4f99b8827737fbc5656b09 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 9 Oct 2015 09:43:36 -0400 Subject: this addresses http://www.wilderssecurity.com/threads/ublock-a-lean-and-fast-blocker.365273/page-63#post-2532835 --- src/js/background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/background.js b/src/js/background.js index 1aa5d54..8ff3b2b 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -57,7 +57,7 @@ return { collapseBlocked: true, colorBlindFriendly: false, contextMenuEnabled: true, - dynamicFilteringEnabled: false, + dynamicFilteringEnabled: true, experimentalEnabled: false, externalLists: defaultExternalLists, firewallPaneMinimized: true, -- cgit v1.1 From b885352724fe590669b46d514276cd01901d37d5 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 9 Oct 2015 10:24:48 -0400 Subject: this fixes bad code review --- platform/firefox/vapi-background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 5f3fce4..7038afb 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -533,7 +533,7 @@ var getTabBrowser = (function() { if ( vAPI.thunderbird ) { return function(win) { - win.document.getElementById('tabmail'); + return win.document.getElementById('tabmail') || null; }; } -- cgit v1.1 From 300968ac3420fe568ede9fd771c9898d53656c70 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 9 Oct 2015 10:37:02 -0400 Subject: this fixes more Thunderbird errors in console --- platform/firefox/vapi-background.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 7038afb..ccbbcd8 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -1188,14 +1188,19 @@ var tabWatcher = (function() { // Initialize map with existing active tabs var start = function() { - var tabBrowser, tab; + var tabBrowser, tabs, tab; for ( var win of vAPI.tabs.getWindows() ) { onWindowLoad.call(win); tabBrowser = getTabBrowser(win); if ( tabBrowser === null ) { continue; } - for ( tab of tabBrowser.tabs ) { + // `tabBrowser.tabs` may not exist (Thunderbird). + tabs = tabBrowser.tabs; + if ( !tabs ) { + continue; + } + for ( tab of tabs ) { if ( vAPI.fennec || !tab.hasAttribute('pending') ) { tabIdFromTarget(tab); } @@ -2879,6 +2884,12 @@ vAPI.contextMenu.register = function(doc) { } var contextMenu = doc.getElementById('contentAreaContextMenu'); + + // This can happen (Thunderbird). + if ( contextMenu === null ) { + return; + } + var menuitem = doc.createElement('menuitem'); menuitem.setAttribute('id', this.menuItemId); menuitem.setAttribute('label', this.menuLabel); -- cgit v1.1 From 31a95b2326a63881e421a4014df54050ea543adc Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 9 Oct 2015 10:46:21 -0400 Subject: this takes care of pop-under on pornhub.com --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index b40bbfc..2fab921 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -3300f3396088c2b86ffaff40966f7726 assets/ublock/filters.txt +6083c4567f14a9282ae1bb7dd7cfa13f assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index a1a9791..9330762 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -151,6 +151,7 @@ arstechnica.com##script:contains(ars.READY.push) dayt.se##script:contains(adBlockDetected) explosm.net##script:contains(/^__durl=/) focus.de##script:contains(uabInject) +pornhub.com##script:contains(FastPopSessionRequestNumber) rp-online.de##script:contains(uabInject) wetter.com##script:contains(uabInject) wetteronline.de##script:contains(uabInject) -- cgit v1.1 From a482102f4bae969c26963c3e93491e1779420e49 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 9 Oct 2015 11:41:15 -0400 Subject: this addresses https://github.com/gorhill/uBlock/issues/795#issuecomment-146901820 --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 2fab921..35399a4 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -6083c4567f14a9282ae1bb7dd7cfa13f assets/ublock/filters.txt +d35d1b63bf20156da4c3f1caba4bd3ae assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 9330762..15d0da5 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -150,8 +150,8 @@ arstechnica.com###lg-pushdown arstechnica.com##script:contains(ars.READY.push) dayt.se##script:contains(adBlockDetected) explosm.net##script:contains(/^__durl=/) +extremetube.com,gaytube.com,mofosex.com,pornhub.com,redtube.com,spankwire.com,thumbzilla.com,tube8.*,xtube.com,youporn.com,youporngay.com##script:contains(FastPopSessionRequestNumber) focus.de##script:contains(uabInject) -pornhub.com##script:contains(FastPopSessionRequestNumber) rp-online.de##script:contains(uabInject) wetter.com##script:contains(uabInject) wetteronline.de##script:contains(uabInject) -- cgit v1.1 From 194e04c86586846bdef7a63c92108ff320d99ce6 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 10 Oct 2015 08:44:52 -0400 Subject: more inline script tag filters --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 35399a4..a14bcf2 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -d35d1b63bf20156da4c3f1caba4bd3ae assets/ublock/filters.txt +a678b80a89aa977cd5df1df67630bb3b assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 15d0da5..efd0d2f 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -150,8 +150,5 @@ arstechnica.com###lg-pushdown arstechnica.com##script:contains(ars.READY.push) dayt.se##script:contains(adBlockDetected) explosm.net##script:contains(/^__durl=/) -extremetube.com,gaytube.com,mofosex.com,pornhub.com,redtube.com,spankwire.com,thumbzilla.com,tube8.*,xtube.com,youporn.com,youporngay.com##script:contains(FastPopSessionRequestNumber) -focus.de##script:contains(uabInject) -rp-online.de##script:contains(uabInject) -wetter.com##script:contains(uabInject) -wetteronline.de##script:contains(uabInject) +extremetube.com,gaytube.com,keezmovies.com,mofosex.com,pornhub.com,redtube.com,spankwire.com,thumbzilla.com,tube8.*,xtube.com,youporn.com,youporngay.com##script:contains(FastPopSessionRequestNumber) +echo-online.de,focus.de,rp-online.de,wetter.com,wetteronline.de##script:contains(uabInject) -- cgit v1.1 From 75cc4b298bf85247bb8038b03270b9970655877d Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 10 Oct 2015 10:13:33 -0400 Subject: this fixes #808 --- assets/checksums.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index a14bcf2..d54edbc 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -a678b80a89aa977cd5df1df67630bb3b assets/ublock/filters.txt +b47f08603aa25c2edea8fef2a066051a assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json -- cgit v1.1 From 80fe05dbc18d8a5db6cccfb194c57ba2e3039f7d Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 10 Oct 2015 11:45:03 -0400 Subject: more script tag filters agains self-defacement (source: https://adblockplus.org/forum/viewtopic.php?f=4&t=40976) --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index d54edbc..932ff84 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -b47f08603aa25c2edea8fef2a066051a assets/ublock/filters.txt +2260cd6508193bfe067152c56bf8b3eb assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index efd0d2f..25b3599 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -151,4 +151,4 @@ arstechnica.com##script:contains(ars.READY.push) dayt.se##script:contains(adBlockDetected) explosm.net##script:contains(/^__durl=/) extremetube.com,gaytube.com,keezmovies.com,mofosex.com,pornhub.com,redtube.com,spankwire.com,thumbzilla.com,tube8.*,xtube.com,youporn.com,youporngay.com##script:contains(FastPopSessionRequestNumber) -echo-online.de,focus.de,rp-online.de,wetter.com,wetteronline.de##script:contains(uabInject) +auto-motor-und-sport.de,boerse-online.de,echo-online.de,fem.com,finanzen.net,focus.de,gamestar.de,kabeleins.de,pcwelt.de,prosieben.de,prosiebenmaxx.de,rp-online.de,sat1.de,sat1gold.de,sixx.de,the-voice-of-germany.de,tvspielfilm.de,wetter.com,wetteronline.de##script:contains(uabInject) -- cgit v1.1 From 0eb42fdf4b949593e83d1d59f23c9de467913bfa Mon Sep 17 00:00:00 2001 From: Manuel Reimer Date: Sat, 10 Oct 2015 23:33:08 +0200 Subject: Thunderbird: Fix closing extension tabs --- platform/firefox/vapi-background.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index ccbbcd8..cff89ba 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -818,7 +818,7 @@ vAPI.tabs.replace = function(tabId, url) { /******************************************************************************/ vAPI.tabs._remove = (function() { - if ( vAPI.fennec ) { + if ( vAPI.fennec || vAPI.thunderbird ) { return function(tab, tabBrowser) { tabBrowser.closeTab(tab); }; @@ -972,6 +972,13 @@ var tabWatcher = (function() { if ( target.browser ) { // target is a tab target = target.browser; } + } else if ( vAPI.thunderbird ) { + if ( target.mode ) { // target is object with tab info + var browserFunc = target.mode.getBrowser || target.mode.tabType.getBrowser; + if (browserFunc) { + return browserFunc.call(target.mode.tabType, target); + } + } } else if ( target.linkedPanel ) { // target is a tab target = target.linkedBrowser; } @@ -1143,7 +1150,9 @@ var tabWatcher = (function() { // To keep in mind: not all windows are tab containers, // sometimes the window IS the tab. var tabs; - if ( tabBrowser.tabs ) { + if ( vAPI.thunderbird ) { + tabs = tabBrowser.tabInfo; + } else if ( tabBrowser.tabs ) { tabs = tabBrowser.tabs; } else if ( tabBrowser.localName === 'browser' ) { tabs = [tabBrowser]; @@ -1152,7 +1161,8 @@ var tabWatcher = (function() { } var browser, URI, tabId; - for ( var tab of tabs ) { + for ( var tabindex = tabs.length - 1; tabindex >= 0; tabindex-- ) { + var tab = tabs[tabindex]; browser = tabWatcher.browserFromTarget(tab); if ( browser === null ) { continue; -- cgit v1.1 From b0fcfaca7dad641ee92542bc8a84dd0d1275d061 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 12 Oct 2015 13:10:54 -0400 Subject: to unbreak buttons not working --- assets/checksums.txt | 2 +- assets/ublock/unbreak.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 932ff84..c5f6f39 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,4 +1,4 @@ -c09d4742808ff3ffc6ae7e9d3d3d0887 assets/ublock/unbreak.txt +60fe70b6f29cce86617af29d717c8256 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt 2260cd6508193bfe067152c56bf8b3eb assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt diff --git a/assets/ublock/unbreak.txt b/assets/ublock/unbreak.txt index 6e9c196..690292a 100644 --- a/assets/ublock/unbreak.txt +++ b/assets/ublock/unbreak.txt @@ -224,3 +224,7 @@ ovh.strim.io#@##tweets @@||www.google-analytics.com/plugins/ua/linkid.js$script,domain=support.amd.com @@||www.google-analytics.com/analytics.js$script,domain=support.amd.com @@||www.googletagmanager.com/gtm.js$script,domain=support.amd.com + +# https://www.reddit.com/r/uBlockOrigin/comments/3oca9w/how_to_keep_ublock_from_interfering_with_button/ +@@||partner.googleadservices.com/gpt/$script,domain=www.merriam-webster.com +@@||www.atpworldtour.com/assets/js/util/googleAnalytics.js$script,first-party -- cgit v1.1 From ceb9800eb16591459d3293d4d07cbcffe61fdf46 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 12 Oct 2015 17:06:25 -0400 Subject: code review --- platform/firefox/vapi-background.js | 53 +++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index cff89ba..e21afdf 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -964,29 +964,36 @@ var tabWatcher = (function() { return tabbrowser.tabs[i]; }; - var browserFromTarget = function(target) { - if ( !target ) { - return null; - } + var browserFromTarget = (function() { if ( vAPI.fennec ) { - if ( target.browser ) { // target is a tab - target = target.browser; - } - } else if ( vAPI.thunderbird ) { - if ( target.mode ) { // target is object with tab info - var browserFunc = target.mode.getBrowser || target.mode.tabType.getBrowser; - if (browserFunc) { - return browserFunc.call(target.mode.tabType, target); + return function(target) { + if ( !target ) { return null; } + if ( target.browser ) { // target is a tab + target = target.browser; } - } - } else if ( target.linkedPanel ) { // target is a tab - target = target.linkedBrowser; + return target.localName === 'browser' ? target : null; + }; } - if ( target.localName !== 'browser' ) { - return null; + if ( vAPI.thunderbird ) { + return function(target) { + if ( !target ) { return null; } + if ( target.mode ) { // target is object with tab info + var browserFunc = target.mode.getBrowser || target.mode.tabType.getBrowser; + if ( browserFunc ) { + return browserFunc.call(target.mode.tabType, target); + } + } + return target.localName === 'browser' ? target : null; + }; } - return target; - }; + return function(target) { + if ( !target ) { return null; } + if ( target.linkedPanel ) { // target is a tab + target = target.linkedBrowser; + } + return target.localName === 'browser' ? target : null; + }; + })(); var tabIdFromTarget = function(target) { var browser = browserFromTarget(target); @@ -1161,9 +1168,10 @@ var tabWatcher = (function() { } var browser, URI, tabId; - for ( var tabindex = tabs.length - 1; tabindex >= 0; tabindex-- ) { - var tab = tabs[tabindex]; - browser = tabWatcher.browserFromTarget(tab); + var tabindex = tabs.length, tab; + while ( tabindex-- ) { + tab = tabs[tabindex]; + browser = browserFromTarget(tab); if ( browser === null ) { continue; } @@ -1172,7 +1180,6 @@ var tabWatcher = (function() { if ( URI.schemeIs('chrome') && URI.host === location.host ) { vAPI.tabs._remove(tab, getTabBrowser(this)); } - browser = browserFromTarget(tab); tabId = browserToTabIdMap.get(browser); if ( tabId !== undefined ) { removeBrowserEntry(tabId, browser); -- cgit v1.1 From dea6dc3f21f2bf789088a017c0e280ef77db3dc7 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 12 Oct 2015 18:51:19 -0400 Subject: this takes care of https://adblockplus.org/forum/viewtopic.php?f=2&t=41059 --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index c5f6f39..5488a33 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 60fe70b6f29cce86617af29d717c8256 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -2260cd6508193bfe067152c56bf8b3eb assets/ublock/filters.txt +9be570bc8ecfb61f69fc55193cdcb690 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 25b3599..3a6f4b3 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -149,6 +149,7 @@ arstechnica.com###lg-pushdown # it in their respective filter lists arstechnica.com##script:contains(ars.READY.push) dayt.se##script:contains(adBlockDetected) +www.dpstream.net##script:contains(/^var\s+uniqueParam\s*=/) explosm.net##script:contains(/^__durl=/) extremetube.com,gaytube.com,keezmovies.com,mofosex.com,pornhub.com,redtube.com,spankwire.com,thumbzilla.com,tube8.*,xtube.com,youporn.com,youporngay.com##script:contains(FastPopSessionRequestNumber) auto-motor-und-sport.de,boerse-online.de,echo-online.de,fem.com,finanzen.net,focus.de,gamestar.de,kabeleins.de,pcwelt.de,prosieben.de,prosiebenmaxx.de,rp-online.de,sat1.de,sat1gold.de,sixx.de,the-voice-of-germany.de,tvspielfilm.de,wetter.com,wetteronline.de##script:contains(uabInject) -- cgit v1.1 From 24a9d91b710ca62b2789c8c5cbee89afa7e57b98 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 12 Oct 2015 23:41:50 -0400 Subject: this addresses https://adblockplus.org/forum/viewtopic.php?f=2&t=40895 --- assets/checksums.txt | 4 ++-- assets/ublock/filters.txt | 2 +- assets/ublock/unbreak.txt | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 5488a33..fa3bbae 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ -60fe70b6f29cce86617af29d717c8256 assets/ublock/unbreak.txt +2fcc7433e7f6b760c7ffddda6e4f6c18 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -9be570bc8ecfb61f69fc55193cdcb690 assets/ublock/filters.txt +9dba4521ec5640e4469201cba639f098 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 3a6f4b3..db50fc1 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -148,7 +148,7 @@ arstechnica.com###lg-pushdown # Useful inline script tag filters until filter list maintainers start to use # it in their respective filter lists arstechnica.com##script:contains(ars.READY.push) -dayt.se##script:contains(adBlockDetected) +dayt.se##script:contains(adblock.php) www.dpstream.net##script:contains(/^var\s+uniqueParam\s*=/) explosm.net##script:contains(/^__durl=/) extremetube.com,gaytube.com,keezmovies.com,mofosex.com,pornhub.com,redtube.com,spankwire.com,thumbzilla.com,tube8.*,xtube.com,youporn.com,youporngay.com##script:contains(FastPopSessionRequestNumber) diff --git a/assets/ublock/unbreak.txt b/assets/ublock/unbreak.txt index 690292a..41509bb 100644 --- a/assets/ublock/unbreak.txt +++ b/assets/ublock/unbreak.txt @@ -228,3 +228,7 @@ ovh.strim.io#@##tweets # https://www.reddit.com/r/uBlockOrigin/comments/3oca9w/how_to_keep_ublock_from_interfering_with_button/ @@||partner.googleadservices.com/gpt/$script,domain=www.merriam-webster.com @@||www.atpworldtour.com/assets/js/util/googleAnalytics.js$script,first-party + +# https://twitter.com/bociusz/status/653693746626871296 +# To counter Peter Lowe's `pagefair.com`, but only when on `pagefair.com` +@@||pagefair.com^$first-party -- cgit v1.1 From 6424aee78888f741013f8fab57bfaf5b45ad5de7 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 13 Oct 2015 09:34:11 -0400 Subject: this fixes #820 --- platform/firefox/vapi-background.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index e21afdf..78840b2 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -1051,6 +1051,10 @@ var tabWatcher = (function() { } }; + var removeTarget = function(target) { + onClose({ target: target }); + }; + // https://developer.mozilla.org/en-US/docs/Web/Events/TabOpen //var onOpen = function({target}) { // var tabId = tabIdFromTarget(target); @@ -1246,6 +1250,7 @@ var tabWatcher = (function() { browserFromTarget: browserFromTarget, currentBrowser: currentBrowser, indexFromTarget: indexFromTarget, + removeTarget: removeTarget, start: start, tabFromBrowser: tabFromBrowser, tabIdFromTarget: tabIdFromTarget @@ -2050,10 +2055,22 @@ vAPI.net.registerListeners = function() { var locationChangedListener = function(e) { var browser = e.target; + // I have seen this happens (at startup time) + if ( !browser.currentURI ) { + return; + } + // https://github.com/gorhill/uBlock/issues/697 // Dismiss event if the associated tab is pending. var tab = tabWatcher.tabFromBrowser(browser); if ( !vAPI.fennec && tab && tab.hasAttribute('pending') ) { + // https://github.com/gorhill/uBlock/issues/820 + // Firefox quirk: it happens the `pending` attribute was not + // present for certain tabs at startup -- and this can cause + // unwanted [browser <--> tab id] associations internally. + // Dispose of these if it is found the `pending` attribute is + // set. + tabWatcher.removeTarget(tab); return; } -- cgit v1.1 From 911ea2f85e3fb5894d9fa62dc6e45df9e68116da Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 13 Oct 2015 09:47:53 -0400 Subject: this fixes #821 --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index fa3bbae..ecdd883 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 2fcc7433e7f6b760c7ffddda6e4f6c18 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -9dba4521ec5640e4469201cba639f098 assets/ublock/filters.txt +d21366fc7f0c5675f0871c2462deded2 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index db50fc1..13ea59e 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -148,6 +148,7 @@ arstechnica.com###lg-pushdown # Useful inline script tag filters until filter list maintainers start to use # it in their respective filter lists arstechnica.com##script:contains(ars.READY.push) +bild.de##script:contains(/^\s*de.bild.cmsKonfig/) dayt.se##script:contains(adblock.php) www.dpstream.net##script:contains(/^var\s+uniqueParam\s*=/) explosm.net##script:contains(/^__durl=/) -- cgit v1.1 From 2fdb63c98a2a6518f04039b50f70c5346dddcf9f Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 13 Oct 2015 10:56:59 -0400 Subject: this fixes #806 --- src/js/document-blocked.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/js/document-blocked.js b/src/js/document-blocked.js index 5b1c469..c64954a 100644 --- a/src/js/document-blocked.js +++ b/src/js/document-blocked.js @@ -193,12 +193,9 @@ uDom.nodeFromId('why').textContent = details.fs; }; var renderParams = function(parentNode, rawURL) { - var url = null; - try { - url = new URL(rawURL); - } catch(ex) { - } - if ( url === null || url.search.length === 0 ) { + var a = document.createElement('a'); + a.href = rawURL; + if ( a.search.length === 0 ) { return false; } @@ -209,7 +206,7 @@ uDom.nodeFromId('why').textContent = details.fs; ); parentNode.appendChild(li); - var params = url.search.slice(1).split('&'); + var params = a.search.slice(1).split('&'); var param, name, value, ul; for ( var i = 0; i < params.length; i++ ) { param = params[i]; -- cgit v1.1 From 5ae956557b549bcd69bbf05cfcf195842c4416da Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 13 Oct 2015 11:27:13 -0400 Subject: this addresses https://forums.lanik.us/viewtopic.php?f=62&t=25857 --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index ecdd883..ec3fc50 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 2fcc7433e7f6b760c7ffddda6e4f6c18 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -d21366fc7f0c5675f0871c2462deded2 assets/ublock/filters.txt +e08a411442828c4d6e2e135c10f55f93 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 13ea59e..62a826d 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -150,7 +150,7 @@ arstechnica.com###lg-pushdown arstechnica.com##script:contains(ars.READY.push) bild.de##script:contains(/^\s*de.bild.cmsKonfig/) dayt.se##script:contains(adblock.php) -www.dpstream.net##script:contains(/^var\s+uniqueParam\s*=/) +dpstream.net,jeux-porno.net##script:contains(/^\s*?var\s+?uniqueParam\s*?=/) explosm.net##script:contains(/^__durl=/) extremetube.com,gaytube.com,keezmovies.com,mofosex.com,pornhub.com,redtube.com,spankwire.com,thumbzilla.com,tube8.*,xtube.com,youporn.com,youporngay.com##script:contains(FastPopSessionRequestNumber) auto-motor-und-sport.de,boerse-online.de,echo-online.de,fem.com,finanzen.net,focus.de,gamestar.de,kabeleins.de,pcwelt.de,prosieben.de,prosiebenmaxx.de,rp-online.de,sat1.de,sat1gold.de,sixx.de,the-voice-of-germany.de,tvspielfilm.de,wetter.com,wetteronline.de##script:contains(uabInject) -- cgit v1.1 From 12009d506809a04d03f74d4f104d1392ad4b7318 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 13 Oct 2015 12:22:41 -0400 Subject: this furtehr addresses #821 --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index ec3fc50..1b42aeb 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 2fcc7433e7f6b760c7ffddda6e4f6c18 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -e08a411442828c4d6e2e135c10f55f93 assets/ublock/filters.txt +b0ab34b34925ff494d953ef78ff81229 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 62a826d..bc73ce3 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -154,3 +154,6 @@ dpstream.net,jeux-porno.net##script:contains(/^\s*?var\s+?uniqueParam\s*?=/) explosm.net##script:contains(/^__durl=/) extremetube.com,gaytube.com,keezmovies.com,mofosex.com,pornhub.com,redtube.com,spankwire.com,thumbzilla.com,tube8.*,xtube.com,youporn.com,youporngay.com##script:contains(FastPopSessionRequestNumber) auto-motor-und-sport.de,boerse-online.de,echo-online.de,fem.com,finanzen.net,focus.de,gamestar.de,kabeleins.de,pcwelt.de,prosieben.de,prosiebenmaxx.de,rp-online.de,sat1.de,sat1gold.de,sixx.de,the-voice-of-germany.de,tvspielfilm.de,wetter.com,wetteronline.de##script:contains(uabInject) + +# http://www.pcworld.com/article/2992434/browsers/sorry-ad-blockers-german-news-site-bild-says-nein.html +||code.bildstatic.de/*/bild/built/konfig/js/packages/core.js$domain=www.bild.de,script -- cgit v1.1 From a3ed66688b1d6f9868f0db500eb1e05c2e438545 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 13 Oct 2015 12:36:29 -0400 Subject: Re. #821: revert last commit: breaks too much functionality on site Best is to use Firefox until Chromium supports `beforescriptexecute`. --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 1b42aeb..ec3fc50 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 2fcc7433e7f6b760c7ffddda6e4f6c18 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -b0ab34b34925ff494d953ef78ff81229 assets/ublock/filters.txt +e08a411442828c4d6e2e135c10f55f93 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index bc73ce3..62a826d 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -154,6 +154,3 @@ dpstream.net,jeux-porno.net##script:contains(/^\s*?var\s+?uniqueParam\s*?=/) explosm.net##script:contains(/^__durl=/) extremetube.com,gaytube.com,keezmovies.com,mofosex.com,pornhub.com,redtube.com,spankwire.com,thumbzilla.com,tube8.*,xtube.com,youporn.com,youporngay.com##script:contains(FastPopSessionRequestNumber) auto-motor-und-sport.de,boerse-online.de,echo-online.de,fem.com,finanzen.net,focus.de,gamestar.de,kabeleins.de,pcwelt.de,prosieben.de,prosiebenmaxx.de,rp-online.de,sat1.de,sat1gold.de,sixx.de,the-voice-of-germany.de,tvspielfilm.de,wetter.com,wetteronline.de##script:contains(uabInject) - -# http://www.pcworld.com/article/2992434/browsers/sorry-ad-blockers-german-news-site-bild-says-nein.html -||code.bildstatic.de/*/bild/built/konfig/js/packages/core.js$domain=www.bild.de,script -- cgit v1.1 From 6cb185c9735422bafa286ae4faf2f1dcff9d2d19 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 13 Oct 2015 14:04:48 -0400 Subject: this addresses https://www.reddit.com/r/pathofexile/comments/3okptl/ublock_origins_wont_let_me_open_links_in_new_tabs/cvyd5xb --- src/js/contentscript-end.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/contentscript-end.js b/src/js/contentscript-end.js index 16d0cbf..7ac8505 100644 --- a/src/js/contentscript-end.js +++ b/src/js/contentscript-end.js @@ -919,11 +919,15 @@ var uBlockCollapser = (function() { return; } var onMouseClick = function(ev) { + var elem = ev.target; + while ( elem !== null && elem.localName !== 'a' ) { + elem = elem.parentElement; + } messager.send({ what: 'mouseClick', x: ev.clientX, y: ev.clientY, - url: ev.target && ev.target.localName === 'a' ? ev.target.href : '' + url: elem !== null ? elem.href : '' }); }; -- cgit v1.1 From 8106604a2a1852d5c612948233f8efb55584067c Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 14 Oct 2015 07:54:25 -0400 Subject: this fixes reported issue in Chrome store: "pictures and maps on redfin get blocked" --- assets/checksums.txt | 2 +- assets/ublock/unbreak.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index ec3fc50..51cfdb1 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,4 +1,4 @@ -2fcc7433e7f6b760c7ffddda6e4f6c18 assets/ublock/unbreak.txt +b5c07e5aa995b8186484d481443aa27d assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt e08a411442828c4d6e2e135c10f55f93 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt diff --git a/assets/ublock/unbreak.txt b/assets/ublock/unbreak.txt index 41509bb..9d38f0d 100644 --- a/assets/ublock/unbreak.txt +++ b/assets/ublock/unbreak.txt @@ -232,3 +232,6 @@ ovh.strim.io#@##tweets # https://twitter.com/bociusz/status/653693746626871296 # To counter Peter Lowe's `pagefair.com`, but only when on `pagefair.com` @@||pagefair.com^$first-party + +# Chrome store: "Some of the useful content on website such as pictures and maps on redfin get blocked" +@@||ssl.cdn-redfin.com/*/redfin/common/analytics/PixelTracking.js$script,domain=redfin.com -- cgit v1.1 From 4fcdac821dcd63cc6ee99a55b238868de8a1e1d9 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 14 Oct 2015 10:28:37 -0400 Subject: this fixes #760 --- src/js/assets.js | 75 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 64 insertions(+), 11 deletions(-) diff --git a/src/js/assets.js b/src/js/assets.js index d26d04c..21878f8 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -276,8 +276,14 @@ var cachedAssetsManager = (function() { exports.remove(/./); }; + exports.exists = function(path) { + return entries !== null && entries.hasOwnProperty(path); + }; + exports.onRemovedListener = null; + getEntries(function(){}); + return exports; })(); @@ -286,6 +292,10 @@ var cachedAssetsManager = (function() { var getTextFileFromURL = function(url, onLoad, onError) { // console.log('µBlock.assets/getTextFileFromURL("%s"):', url); + if ( typeof onError !== 'function' ) { + onError = onLoad; + } + // https://github.com/gorhill/uMatrix/issues/15 var onResponseReceived = function() { this.onload = this.onerror = this.ontimeout = null; @@ -377,11 +387,16 @@ var getRepoMetadata = function(callback) { lastRepoMetaTimestamp = Date.now(); lastRepoMetaIsRemote = exports.remoteFetchBarrier === 0; + var defaultChecksums; var localChecksums; var repoChecksums; var checksumsReceived = function() { - if ( localChecksums === undefined || repoChecksums === undefined ) { + if ( + defaultChecksums === undefined || + localChecksums === undefined || + repoChecksums === undefined + ) { return; } // Remove from cache assets which no longer exist in the repo @@ -393,6 +408,15 @@ var getRepoMetadata = function(callback) { continue; } entry = entries[path]; + // https://github.com/gorhill/uBlock/issues/760 + // If the resource does not have a cached instance, we must reset + // the checksum to its value at install time. + if ( + cachedAssetsManager.exists(path) === false && + stringIsNotEmpty(defaultChecksums[path]) + ) { + entry.localChecksum = defaultChecksums[path]; + } // If repo checksums could not be fetched, assume no change. // https://github.com/gorhill/uBlock/issues/602 // Added: if repo checksum is that of the empty string, @@ -451,41 +475,64 @@ var getRepoMetadata = function(callback) { return out.join('\n'); }; - var parseChecksums = function(text, which) { - var entries = repoMetadata.entries; + var parseChecksums = function(text, eachFn) { var lines = text.split(/\n+/); var i = lines.length; - var fields, assetPath; + var fields; while ( i-- ) { fields = lines[i].trim().split(/\s+/); if ( fields.length !== 2 ) { continue; } - assetPath = fields[1]; - if ( entries[assetPath] === undefined ) { - entries[assetPath] = new AssetEntry(); - } - entries[assetPath][which + 'Checksum'] = fields[0]; + eachFn(fields[1], fields[0]); } }; var onLocalChecksumsLoaded = function(details) { + var entries = repoMetadata.entries; + var processChecksum = function(path, checksum) { + if ( entries.hasOwnProperty(path) === false ) { + entries[path] = new AssetEntry(); + } + entries[path].localChecksum = checksum; + }; if ( (localChecksums = validateChecksums(details)) ) { - parseChecksums(localChecksums, 'local'); + parseChecksums(localChecksums, processChecksum); } checksumsReceived(); }; var onRepoChecksumsLoaded = function(details) { + var entries = repoMetadata.entries; + var processChecksum = function(path, checksum) { + if ( entries.hasOwnProperty(path) === false ) { + entries[path] = new AssetEntry(); + } + entries[path].repoChecksum = checksum; + }; if ( (repoChecksums = validateChecksums(details)) ) { - parseChecksums(repoChecksums, 'repo'); + parseChecksums(repoChecksums, processChecksum); } checksumsReceived(); }; + // https://github.com/gorhill/uBlock/issues/760 + // We need the checksum values at install time, because some resources + // may have been purged, in which case the checksum must be reset to the + // value at install time. + var onDefaultChecksumsLoaded = function() { + defaultChecksums = Object.create(null); + var processChecksum = function(path, checksum) { + defaultChecksums[path] = checksum; + }; + parseChecksums(this.responseText || '', processChecksum); + checksumsReceived(); + }; + repoMetadata = new RepoMetadata(); repoMetadata.waiting.push(callback); readRepoFile('assets/checksums.txt', onRepoChecksumsLoaded); + getTextFileFromURL(vAPI.getURL('assets/checksums.txt'), onDefaultChecksumsLoaded); readLocalFile('assets/checksums.txt', onLocalChecksumsLoaded); }; @@ -1164,10 +1211,16 @@ exports.metadata = function(callback) { /******************************************************************************/ exports.purge = function(pattern, before) { + // Purging means we should mark resources current metadata as obsolete. + lastRepoMetaTimestamp = 0; + cachedAssetsManager.remove(pattern, before); }; exports.purgeAll = function(callback) { + // Purging means we should mark resources current metadata as obsolete. + lastRepoMetaTimestamp = 0; + cachedAssetsManager.removeAll(callback); }; -- cgit v1.1 From 1490307f093f294e893acd36a7ecf0a96f992c8a Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 14 Oct 2015 12:37:09 -0400 Subject: this fixes the improper rendering of southwest.com -- reported in Chrome store --- assets/checksums.txt | 2 +- assets/ublock/unbreak.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 51cfdb1..93c69e2 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,4 +1,4 @@ -b5c07e5aa995b8186484d481443aa27d assets/ublock/unbreak.txt +7e679d07b2350b215a5f01456e84fe73 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt e08a411442828c4d6e2e135c10f55f93 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt diff --git a/assets/ublock/unbreak.txt b/assets/ublock/unbreak.txt index 9d38f0d..e097651 100644 --- a/assets/ublock/unbreak.txt +++ b/assets/ublock/unbreak.txt @@ -235,3 +235,6 @@ ovh.strim.io#@##tweets # Chrome store: "Some of the useful content on website such as pictures and maps on redfin get blocked" @@||ssl.cdn-redfin.com/*/redfin/common/analytics/PixelTracking.js$script,domain=redfin.com + +# Chrome store: "uBlock Origin seems to think Southwest.com's background and header image are ads" +@@||www.southwest.com/*/mbox.js$script,first-party -- cgit v1.1 From 135ad95d61871db9054a52e478170d5f91221787 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 14 Oct 2015 14:16:43 -0400 Subject: #760: reflect obsolete status immediately in UI --- src/js/3p-filters.js | 14 ++++++++++++++ src/js/assets.js | 16 +++++++++------- src/js/messaging.js | 2 +- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/js/3p-filters.js b/src/js/3p-filters.js index a3e81b8..b5fca1b 100644 --- a/src/js/3p-filters.js +++ b/src/js/3p-filters.js @@ -371,8 +371,22 @@ var onPurgeClicked = function() { if ( !href ) { return; } + messager.send({ what: 'purgeCache', path: href }); button.remove(); + + // If the cached version is purged, the installed version must be assumed + // to be obsolete. + var entry = listDetails.current && listDetails.current[href]; + if ( entry && entry.off !== true ) { + if ( typeof entry.homeURL !== 'string' || entry.homeURL === '' ) { + li.descendants('span.status.new').css('display', ''); + } else { + li.descendants('span.status.obsolete').css('display', ''); + } + needUpdate = true; + } + if ( li.descendants('input').first().prop('checked') ) { cacheWasPurged = true; renderWidgets(); diff --git a/src/js/assets.js b/src/js/assets.js index 21878f8..08616c5 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -412,10 +412,12 @@ var getRepoMetadata = function(callback) { // If the resource does not have a cached instance, we must reset // the checksum to its value at install time. if ( - cachedAssetsManager.exists(path) === false && - stringIsNotEmpty(defaultChecksums[path]) + stringIsNotEmpty(defaultChecksums[path]) && + entry.localChecksum !== defaultChecksums[path] && + cachedAssetsManager.exists(path) === false ) { entry.localChecksum = defaultChecksums[path]; + checksumsChanged = true; } // If repo checksums could not be fetched, assume no change. // https://github.com/gorhill/uBlock/issues/602 @@ -1211,17 +1213,17 @@ exports.metadata = function(callback) { /******************************************************************************/ exports.purge = function(pattern, before) { - // Purging means we should mark resources current metadata as obsolete. - lastRepoMetaTimestamp = 0; - cachedAssetsManager.remove(pattern, before); }; -exports.purgeAll = function(callback) { - // Purging means we should mark resources current metadata as obsolete. +exports.purgeCacheableAsset = function(pattern, before) { + cachedAssetsManager.remove(pattern, before); lastRepoMetaTimestamp = 0; +}; +exports.purgeAll = function(callback) { cachedAssetsManager.removeAll(callback); + lastRepoMetaTimestamp = 0; }; /******************************************************************************/ diff --git a/src/js/messaging.js b/src/js/messaging.js index 2841fef..6076f8d 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -815,7 +815,7 @@ var onMessage = function(request, sender, callback) { switch ( request.what ) { case 'purgeCache': - µb.assets.purge(request.path); + µb.assets.purgeCacheableAsset(request.path); break; default: -- cgit v1.1 From ea4d5a9710ff4bdabd1335fe88488b5d49d7cfd8 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 14 Oct 2015 16:49:57 -0400 Subject: different fix for #762, which does not create a regression of 435 --- src/js/contentscript-end.js | 14 ++++++++++---- src/js/contentscript-start.js | 14 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/js/contentscript-end.js b/src/js/contentscript-end.js index 7ac8505..f2986b8 100644 --- a/src/js/contentscript-end.js +++ b/src/js/contentscript-end.js @@ -474,21 +474,27 @@ var uBlockCollapser = (function() { var elem, shadow; while ( i-- ) { elem = elems[i]; - // https://github.com/gorhill/uBlock/issues/762 - // Always hide using inline style. - elem.style.setProperty('display', 'none', 'important'); + shadow = elem.shadowRoot; // https://www.chromestatus.com/features/4668884095336448 // "Multiple shadow roots is being deprecated." - if ( elem.shadowRoot !== null ) { + if ( shadow !== null ) { + if ( shadow.className !== sessionId ) { + elem.style.setProperty('display', 'none', 'important'); + } continue; } // https://github.com/gorhill/uBlock/pull/555 // Not all nodes can be shadowed: // https://github.com/w3c/webcomponents/issues/102 + // https://github.com/gorhill/uBlock/issues/762 + // Remove display style that might get in the way of the shadow + // node doing its magic. try { shadow = elem.createShadowRoot(); shadow.className = sessionId; + elem.style.removeProperty('display'); } catch (ex) { + elem.style.setProperty('display', 'none', 'important'); } } }; diff --git a/src/js/contentscript-start.js b/src/js/contentscript-start.js index b4a2b04..a625085 100644 --- a/src/js/contentscript-start.js +++ b/src/js/contentscript-start.js @@ -183,21 +183,27 @@ var hideElements = function(selectors) { var elem, shadow; while ( i-- ) { elem = elems[i]; - // https://github.com/gorhill/uBlock/issues/762 - // Always hide using inline style. - elem.style.setProperty('display', 'none', 'important'); + shadow = elem.shadowRoot; // https://www.chromestatus.com/features/4668884095336448 // "Multiple shadow roots is being deprecated." - if ( elem.shadowRoot !== null ) { + if ( shadow !== null ) { + if ( shadow.className !== sessionId ) { + elem.style.setProperty('display', 'none', 'important'); + } continue; } // https://github.com/gorhill/uBlock/pull/555 // Not all nodes can be shadowed: // https://github.com/w3c/webcomponents/issues/102 + // https://github.com/gorhill/uBlock/issues/762 + // Remove display style that might get in the way of the shadow + // node doing its magic. try { shadow = elem.createShadowRoot(); shadow.className = sessionId; + elem.style.removeProperty('display'); } catch (ex) { + elem.style.setProperty('display', 'none', 'important'); } } }; -- cgit v1.1 From 8cd4f3d79384c556ee91e9c7a6d464366d2fe32b Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 15 Oct 2015 07:04:19 -0400 Subject: updated Google-specific cosmetic filters as per latest EasyList content --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 93c69e2..192818d 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 7e679d07b2350b215a5f01456e84fe73 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -e08a411442828c4d6e2e135c10f55f93 assets/ublock/filters.txt +ea7e98d71588cdd3d9bf0158f51c2ce8 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 62a826d..502b086 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -9,8 +9,10 @@ www.zerohedge.com##.similar-box # entity = domain minus public suffix # The following filters were taken out of EasyList and given an entity name, # which makes them candidates to be injected early in the page. -# Last updated: 2015-01-27 +# Last updated: 2015-10-15 google.*###center_col > #\5f Emc +google.*###center_col > #main > .dfrd > .mnr-c > .c._oc._zs +google.*###center_col > #res > #topstuff + #search > div > #ires > #rso > #flun google.*###center_col > #resultStats + #tads google.*###center_col > #resultStats + #tads + #res + #tads google.*###center_col > #resultStats + div + #res + #tads @@ -18,14 +20,19 @@ google.*###center_col > #resultStats + div[style="border:1px solid #dedede;margi google.*###center_col > #taw > #tvcap > .rscontainer google.*###center_col > div[style="font-size:14px;margin-right:0;min-height:5px"] > div[style="font-size:14px;margin:0 4px;padding:1px 5px;background:#fff8e7"] google.*###cnt #center_col > #res > #topstuff > .ts +google.*###cnt #center_col > #taw > #tvcap > .c._oc._Lp google.*###main_col > #center_col div[style="font-size:14px;margin:0 4px;padding:1px 5px;background:#fff7ed"] google.*###mbEnd[cellspacing="0"][cellpadding="0"] google.*###mclip_container:last-child google.*###mn #center_col > div > h2.spon:first-child google.*###mn #center_col > div > h2.spon:first-child + ol:last-child +google.*###mn div[style="position:relative"] > #center_col > ._Ak +google.*###mn div[style="position:relative"] > #center_col > div > ._dPg google.*###resultspanel > #topads google.*###rhs_block > #mbEnd google.*###rhs_block > .ts[cellspacing="0"][cellpadding="0"][style="padding:0"] +google.*###rhs_block > ol > .rhsvw > .kp-blk > .xpdopen > ._OKe > ol > ._DJe > .luhb-div +google.*###rhs_block > script + .c._oc._Ve.rhsvw google.*###rhswrapper > #rhssection[border="0"][bgcolor="#ffffff"] google.*###ssmiwdiv[jsdisplay] google.*###tads + div + .c @@ -43,6 +50,7 @@ google.*##.GPMV2XEDA2 > .GPMV2XEDP1 > .GPMV2XEDJBB google.*##.ch[onclick="ga(this,event)"] google.*##.commercial-unit-desktop-rhs google.*##.commercial-unit-desktop-top +google.*##.commercial-unit-mobile-top google.*##.lads[width="100%"][style="background:#FFF8DD"] google.*##.mod > ._jH + .rscontainer google.*##.mw > #rcnt > #center_col > #taw > #tvcap > .c -- cgit v1.1 From 6d0fb26766f12ec5853e7055cd3687bc03ccceea Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 15 Oct 2015 11:27:07 -0400 Subject: bild.de --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index 192818d..f4ecf94 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 7e679d07b2350b215a5f01456e84fe73 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -ea7e98d71588cdd3d9bf0158f51c2ce8 assets/ublock/filters.txt +743f59ebc6bf0a2eb38257930cc09f69 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 502b086..669776b 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -157,6 +157,7 @@ arstechnica.com###lg-pushdown # it in their respective filter lists arstechnica.com##script:contains(ars.READY.push) bild.de##script:contains(/^\s*de.bild.cmsKonfig/) +bild.de##script:contains(Javascript) dayt.se##script:contains(adblock.php) dpstream.net,jeux-porno.net##script:contains(/^\s*?var\s+?uniqueParam\s*?=/) explosm.net##script:contains(/^__durl=/) -- cgit v1.1 From c349511a7b98e8dc1a9c2ff3fdfa35d8b06ff2dd Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 15 Oct 2015 11:39:14 -0400 Subject: bumping version number because of (basic) support for Thunderbird --- platform/chromium/manifest.json | 2 +- platform/opera/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index c0e13c5..81c3148 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.2.2", + "version": "1.3.0", "default_locale": "en", "description": "__MSG_extShortDesc__", diff --git a/platform/opera/manifest.json b/platform/opera/manifest.json index 24b6cac..b177b61 100644 --- a/platform/opera/manifest.json +++ b/platform/opera/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.2.2", + "version": "1.3.0", "default_locale": "en", "description": "__MSG_extShortDesc__", -- cgit v1.1 From 7e18d37b16046e5305c060464cc5aeb2877bf310 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 15 Oct 2015 18:03:29 -0400 Subject: Update README.md --- README.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b796d07..a5915b6 100644 --- a/README.md +++ b/README.md @@ -3,21 +3,11 @@ *** -**Important:** uBlock Origin is **NOT** an "ad blocker": [it is a wide-spectrum blocker](https://github.com/gorhill/uBlock/wiki/Blocking-mode) -- which happens to be able to function as a mere "ad blocker". The default behavior of uBlock Origin when newly installed is to block ads, trackers and malware sites -- through [_EasyList_](https://easylist.adblockplus.org/en/policy#easylist), [_EasyPrivacy_](https://easylist.adblockplus.org/en/policy#easyprivacy), [_Peter Lowe’s ad/tracking/malware servers_](http://pgl.yoyo.org/adservers/policy.php), various lists of [malware](http://www.malwaredomainlist.com/) [sites](http://www.malwaredomains.com/), and uBlock Origin's [own filter lists](https://github.com/gorhill/uBlock/tree/master/assets/ublock). +**uBlock Origin is _completely_ unrelated to the web site `ublock.org`:** the donations sought by the [individual](https://github.com/chrisaljoudi/) behind `ublock.org` are _not_ benefiting any of those who contributed most to create uBlock Origin ([developers](https://github.com/gorhill/uBlock/graphs/contributors), [translators](https://crowdin.com/project/ublock), and all those who put efforts in opening detailed issues). For the differences in features between uBlock Origin and uBlock, you are more likely than anywhere else to find an unbiased explanation in this [Wikipedia article](http://en.wikipedia.org/wiki/UBlock). *** -There is an idea floating around that uBlock Origin is a _lesser_ branch relative to [uBlock](https://github.com/chrisaljoudi/uBlock)[1]. - -The current reality is that there are *two branches*, not an official one and a lesser one. I [keep developing my branch](https://github.com/gorhill/uBlock/wiki/uBlock-vs.-uBlock-Origin:-Facts#ublock-is-the-main-branch-ublock-origin-is-just-bug-fixes) the same way and in the same spirit I have since [the beginning of uBlock in June 23, 2014](http://www.wilderssecurity.com/threads/ublock-a-lean-and-fast-blocker.365273/), so in substance uBlock Origin _is_ the original uBlock. - -**uBlock Origin is _completely_ unrelated to the web site `ublock.org`:** the donations sought by `ublock.org` are _not_ benefiting any of those who contributed most to create uBlock ([developers](https://github.com/gorhill/uBlock/graphs/contributors)[2], [translators](https://crowdin.com/project/ublock), and all those who put efforts in opening detailed issues). For the differences in features between uBlock Origin and uBlock, you are more likely than anywhere else to find an unbiased explanation in this [Wikipedia article](http://en.wikipedia.org/wiki/UBlock). - -Somewhere toward the end of May, I decided I will not contribute code anymore to this [uBlock branch](https://github.com/chrisaljoudi/uBlock).[3] - -[1] [An example](https://www.ublock.org/faq/). [Another one](https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/reviews/716364/).
      -[2] Keep in mind these charts do not take into account all the work done on the wiki (doc, benchmarks), which work was for the most part not contributed by the individual behind `ublock.org`.
      -[3] Reasons: [this](https://en.wikipedia.org/w/index.php?title=UBlock&type=revision&diff=662527440&oldid=662107368) vs. [this](https://github.com/chrisaljoudi/uBlock/commits/master?author=gorhill), and [this](https://www.reddit.com/r/ublock/comments/38lf1y/any_difference_between_ublock_and_ublock_origin/crwhmwt), and overall because of serious incompatibilities in the spirit of the project.
      +uBlock Origin is **NOT** an "ad blocker": [it is a wide-spectrum blocker](https://github.com/gorhill/uBlock/wiki/Blocking-mode) -- which happens to be able to function as a mere "ad blocker". The default behavior of uBlock Origin when newly installed is to block ads, trackers and malware sites -- through [_EasyList_](https://easylist.adblockplus.org/en/policy#easylist), [_EasyPrivacy_](https://easylist.adblockplus.org/en/policy#easyprivacy), [_Peter Lowe’s ad/tracking/malware servers_](http://pgl.yoyo.org/adservers/policy.php), various lists of [malware](http://www.malwaredomainlist.com/) [sites](http://www.malwaredomains.com/), and uBlock Origin's [own filter lists](https://github.com/gorhill/uBlock/tree/master/assets/ublock). *** -- cgit v1.1 From 876c6b3658263b8b2891bbac555a838ea5084ff9 Mon Sep 17 00:00:00 2001 From: gorhill Date: Thu, 15 Oct 2015 19:54:35 -0400 Subject: use custom tooltip for title bar (see #830) --- src/popup.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/popup.html b/src/popup.html index f3c8c70..62f0b07 100644 --- a/src/popup.html +++ b/src/popup.html @@ -10,7 +10,7 @@ - +

      -- cgit v1.1 From adc84350e3a96f7653d2e73f817478749ec393dc Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 16 Oct 2015 09:52:19 -0400 Subject: inline script tag filter for opensubtitles.org --- assets/checksums.txt | 2 +- assets/ublock/filters.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/checksums.txt b/assets/checksums.txt index f4ecf94..fb5fbf6 100644 --- a/assets/checksums.txt +++ b/assets/checksums.txt @@ -1,6 +1,6 @@ 7e679d07b2350b215a5f01456e84fe73 assets/ublock/unbreak.txt 75448208315e80706632ec8a6df0e6d3 assets/ublock/privacy.txt -743f59ebc6bf0a2eb38257930cc09f69 assets/ublock/filters.txt +fa30a140569cca02898fa2e1114d6143 assets/ublock/filters.txt d2c1dc3f8c4528e6d6a9083afc30b938 assets/ublock/badware.txt c9c5cc56bec563bc1885847f925b9be2 assets/ublock/mirror-candidates.txt d6649cbd5533bb5ea3ccd8de060d21fe assets/ublock/filter-lists.json diff --git a/assets/ublock/filters.txt b/assets/ublock/filters.txt index 669776b..e0099f7 100644 --- a/assets/ublock/filters.txt +++ b/assets/ublock/filters.txt @@ -156,10 +156,11 @@ arstechnica.com###lg-pushdown # Useful inline script tag filters until filter list maintainers start to use # it in their respective filter lists arstechnica.com##script:contains(ars.READY.push) +auto-motor-und-sport.de,boerse-online.de,echo-online.de,fem.com,finanzen.net,focus.de,gamestar.de,kabeleins.de,pcwelt.de,prosieben.de,prosiebenmaxx.de,rp-online.de,sat1.de,sat1gold.de,sixx.de,the-voice-of-germany.de,tvspielfilm.de,wetter.com,wetteronline.de##script:contains(uabInject) bild.de##script:contains(/^\s*de.bild.cmsKonfig/) bild.de##script:contains(Javascript) dayt.se##script:contains(adblock.php) dpstream.net,jeux-porno.net##script:contains(/^\s*?var\s+?uniqueParam\s*?=/) explosm.net##script:contains(/^__durl=/) extremetube.com,gaytube.com,keezmovies.com,mofosex.com,pornhub.com,redtube.com,spankwire.com,thumbzilla.com,tube8.*,xtube.com,youporn.com,youporngay.com##script:contains(FastPopSessionRequestNumber) -auto-motor-und-sport.de,boerse-online.de,echo-online.de,fem.com,finanzen.net,focus.de,gamestar.de,kabeleins.de,pcwelt.de,prosieben.de,prosiebenmaxx.de,rp-online.de,sat1.de,sat1gold.de,sixx.de,the-voice-of-germany.de,tvspielfilm.de,wetter.com,wetteronline.de##script:contains(uabInject) +opensubtitles.org##script:contains(defaultCheckForAdBlockExistance) -- cgit v1.1 From 7d9525d6e91f3cb0ae3f868855d342769df17be2 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 16 Oct 2015 10:13:33 -0400 Subject: let's see if this helps #833 --- platform/firefox/vapi-background.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 78840b2..0a4b98d 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -1090,29 +1090,29 @@ var tabWatcher = (function() { return false; } + if ( typeof vAPI.toolbarButton.attachToNewWindow === 'function' ) { + vAPI.toolbarButton.attachToNewWindow(window); + } + var tabContainer; if ( tabBrowser.deck ) { // Fennec tabContainer = tabBrowser.deck; } else if ( tabBrowser.tabContainer ) { // Firefox tabContainer = tabBrowser.tabContainer; vAPI.contextMenu.register(window.document); - } else { - return true; - } - - if ( typeof vAPI.toolbarButton.attachToNewWindow === 'function' ) { - vAPI.toolbarButton.attachToNewWindow(window); } // https://github.com/gorhill/uBlock/issues/697 // Ignore `TabShow` events: unfortunately the `pending` attribute is // not set when a tab is opened as a result of session restore -- it is // set *after* the event is fired in such case. - //tabContainer.addEventListener('TabOpen', onOpen); - tabContainer.addEventListener('TabShow', onShow); - tabContainer.addEventListener('TabClose', onClose); - // when new window is opened TabSelect doesn't run on the selected tab? - tabContainer.addEventListener('TabSelect', onSelect); + if ( tabContainer ) { + //tabContainer.addEventListener('TabOpen', onOpen); + tabContainer.addEventListener('TabShow', onShow); + tabContainer.addEventListener('TabClose', onClose); + // when new window is opened TabSelect doesn't run on the selected tab? + tabContainer.addEventListener('TabSelect', onSelect); + } return true; }; @@ -2354,7 +2354,8 @@ vAPI.toolbarButton = { var addLegacyToolbarButton = function(window) { var document = window.document; - var toolbox = document.getElementById('navigator-toolbox') || document.getElementById('mail-toolbox'); + var toolbox = document.getElementById('navigator-toolbox') || + document.getElementById('mail-toolbox'); if ( !toolbox ) { return; } -- cgit v1.1 From 38a9504caaab7c36f98ecc81194796f6d3b3adea Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 16 Oct 2015 10:14:58 -0400 Subject: translation work from https://crowdin.com/project/ublock --- dist/description/description-sq.txt | 6 ++--- src/_locales/el/messages.json | 10 ++++---- src/_locales/he/messages.json | 4 +-- src/_locales/hu/messages.json | 2 +- src/_locales/sk/messages.json | 4 +-- src/_locales/sq/messages.json | 50 ++++++++++++++++++------------------- src/_locales/uk/messages.json | 8 +++--- 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/dist/description/description-sq.txt b/dist/description/description-sq.txt index 77c63c6..a60c524 100644 --- a/dist/description/description-sq.txt +++ b/dist/description/description-sq.txt @@ -24,13 +24,13 @@ Po të doni, ka edhe shumë lista të tjera të gatshme: - Spam404 - Dhe shumë të tjera -Sigurisht që sa më shumë filtra të aktivizoni, aq më i madh do të jetë impakti te memorja. Edhe me shtimin e dy listave shtesë të Fanboy, hpHosts’s Ad and tracking servers, uBlock përsëri ka impakt më të ulët në memorje sesa bllokuesit e tjerë shumë të njohur. +Sigurisht që sa më shumë filtra të aktivizoni, aq më i madh do të jetë impakti te memorja. Edhe sikur të shtoni dy listat e tjera të Fanboy, hpHosts’s Ad and tracking servers, uBlock përsëri ka impakt më të ulët te memorja sesa bllokuesit e tjerë shumë të njohur. Por, kujdes, sepse duke përzgjedhur disa prej këtyre listave, gjasat që faqet të shfaqin probleme do të jenë më të mëdha -- sidomos listat që normalisht përdoren si skeda "hosts". *** -Pa listat e programuara, ky program nuk vlen për asgjë. Prandaj, po të doni të kontribuoni diçka, mendoni pak për njerëzit që punojnë fort për mirëmbajtjen e listave me filtra që po përdorni, të cilat na ofrohen të gjithëve pa pagesë. +Pa listat e programuara, ky program nuk ka asnjë vlerë. Prandaj, po të doni të kontribuoni diçka, mendoni pak për njerëzit që punojnë fort për mirëmbajtjen e listave me filtra që po përdorni, të cilat na ofrohen të gjithëve pa pagesë. *** @@ -43,7 +43,7 @@ Kontributorët @ Crowdin: https://crowdin.net/project/ublock *** -Kur të bëni vlerësimin e programit, mos harroni se ky është një version paraprak. +Kur bëni vlerësimin e programit, mos harroni se ky është një version paraprak. Ditari i projektit: https://github.com/gorhill/uBlock/releases diff --git a/src/_locales/el/messages.json b/src/_locales/el/messages.json index 6d249fb..4af2dc0 100644 --- a/src/_locales/el/messages.json +++ b/src/_locales/el/messages.json @@ -104,7 +104,7 @@ "description":"" }, "popup3pPassiveRulePrompt":{ - "message":"3rd-party css\/images", + "message":"Css\/Εικόνες τρίτου μέρους", "description":"" }, "popupInlineScriptRulePrompt":{ @@ -176,7 +176,7 @@ "description":"English: Color-blind friendly" }, "settingsCloudStorageEnabledPrompt":{ - "message":"Enable cloud storage support", + "message":"Ενεργοποίηση υποστήριξης cloud storage", "description":"" }, "settingsAdvancedUserPrompt":{ @@ -600,11 +600,11 @@ "description":"English: Permanently" }, "cloudPush":{ - "message":"Export to cloud storage", + "message":"Εξαγωγή στο cloud storage", "description":"tooltip" }, "cloudPull":{ - "message":"Import from cloud storage", + "message":"Εισαγωγή από cloud storage", "description":"tooltip" }, "cloudNoData":{ @@ -612,7 +612,7 @@ "description":"" }, "cloudDeviceNamePrompt":{ - "message":"This device name:", + "message":"Το όνομα της συσκευής:", "description":"used as a prompt for the user to provide a custom device name" }, "genericSubmit":{ diff --git a/src/_locales/he/messages.json b/src/_locales/he/messages.json index 303ac8a..960e436 100644 --- a/src/_locales/he/messages.json +++ b/src/_locales/he/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"ללא פרמטרים", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"ביתים", "description":"" }, "dummy":{ diff --git a/src/_locales/hu/messages.json b/src/_locales/hu/messages.json index 8e40b03..262e7c1 100644 --- a/src/_locales/hu/messages.json +++ b/src/_locales/hu/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"paraméterek nélkül", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ diff --git a/src/_locales/sk/messages.json b/src/_locales/sk/messages.json index 381c3c2..e08a2d3 100644 --- a/src/_locales/sk/messages.json +++ b/src/_locales/sk/messages.json @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"bez parametrov", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"bajtov", "description":"" }, "dummy":{ diff --git a/src/_locales/sq/messages.json b/src/_locales/sq/messages.json index 4f13dd5..e0db1d5 100644 --- a/src/_locales/sq/messages.json +++ b/src/_locales/sq/messages.json @@ -40,7 +40,7 @@ "description":"appears as tab name in dashboard" }, "popupPowerSwitchInfo":{ - "message":"Klikoj: uBlock bëhet joaktiv\/aktiv te ky uebsajti.\n\nCtrl+klikim: uBlock bëhet joaktiv vetëm te kjo faqja.", + "message":"Klikoj: uBlock₀ bëhet joaktiv\/aktiv te ky uebsajti.\n\nCtrl+klikim: uBlock₀ bëhet joaktiv vetëm te kjo faqja.", "description":"English: Click: disable\/enable uBlock₀ for this site.\n\nCtrl+click: disable uBlock₀ only on this page." }, "popupBlockedRequestPrompt":{ @@ -76,7 +76,7 @@ "description":"English: Go to request log" }, "popupTipNoPopups":{ - "message":"Bllokoj të gjitha dritaret që hap kjo faqja", + "message":"Bllokoj të gjitha dritaret automatike që hap kjo faqja", "description":"English: Toggle the blocking of all popups for this site" }, "popupTipNoStrictBlocking":{ @@ -160,7 +160,7 @@ "description":"English: Block element" }, "settingsCollapseBlockedPrompt":{ - "message":"Fsheh simbolin e elementeve të bllokuara", + "message":"Fsheh treguesin e elementeve të bllokuara", "description":"English: Hide placeholders of blocked elements" }, "settingsIconBadgePrompt":{ @@ -172,11 +172,11 @@ "description":"English: Make use of context menu where appropriate" }, "settingsColorBlindPrompt":{ - "message":"Ngjyra të qarta për daltonikët", + "message":"Ndryshoj ngjyrat për daltonikët", "description":"English: Color-blind friendly" }, "settingsCloudStorageEnabledPrompt":{ - "message":"Enable cloud storage support", + "message":"Aktivizoj renë informatike", "description":"" }, "settingsAdvancedUserPrompt":{ @@ -184,7 +184,7 @@ "description":"English: " }, "settingsPrefetchingDisabledPrompt":{ - "message":"Çaktivizoj hapjen e parakohshme të faqeve (parandalon lidhjen për kërkesat e bllokuara nga rrjeti)", + "message":"Çaktivizoj hapjen e parakohshme të faqeve (duke parandaluar lidhjen me kërkesat e bllokuara)", "description":"English: " }, "settingsHyperlinkAuditingDisabledPrompt":{ @@ -252,7 +252,7 @@ "description":"English: Ads" }, "3pGroupPrivacy":{ - "message":"Sfera private", + "message":"Privatësia", "description":"English: Privacy" }, "3pGroupMalware":{ @@ -276,7 +276,7 @@ "description":"English: Custom" }, "3pExternalListsHint":{ - "message":"Një URL për rresht. Rreshtat që kanë si parashtesë ‘!’ nuk do të merren parasysh, sikundër adresat pa kuptim.", + "message":"Një URL për rresht. Nuk do të merren parasysh rreshtat që kanë si parashtesë ‘!’, sikundër adresat pa kuptim.", "description":"English: One URL per line. Lines prefixed with ‘!’ will be ignored. Invalid URLs will be silently ignored." }, "3pExternalListsApply":{ @@ -348,11 +348,11 @@ "description":"Will discard manually-edited content and exit manual-edit mode" }, "rulesImport":{ - "message":"Importoj nga një skedë...", + "message":"Importoj nga një skedar...", "description":"" }, "rulesExport":{ - "message":"Ruaj në skedë", + "message":"Ruaj në skedar", "description":"" }, "rulesDefaultFileName":{ @@ -368,7 +368,7 @@ "description":"English: dynamic rule syntax and full documentation." }, "whitelistPrompt":{ - "message":"Lista juaj me emrat e hosteve për të cilat uBlock do të jetë joaktiv. Një element për rresht. Emrat e pasaktë nuk do të merren parasysh.", + "message":"Lista e hosteve për të cilat uBlock₀ do të jetë joaktiv. Një element për rresht. Nuk do të merren parasysh emrat e pasaktë.", "description":"English: Your list of host names for which uBlock₀ will be disabled. One host name per line. Invalid host names will be silently ignored." }, "whitelistImport":{ @@ -436,7 +436,7 @@ "description":"Small header to identify the static filtering section" }, "loggerStaticFilteringSentence":{ - "message":"{{action}} kërkesat nga rrjeti të {{type}} {{br}}adresa e të cilave korrespondon me {{url}} {{br}}dhe kanë si origjinë {{origin}},{{br}}{{importance}} ka një filtër përjashtues të ngjashëm.", + "message":"{{action}} kërkesat e {{type}} {{br}}adresa e të cilave korrespondon me {{url}} {{br}}dhe që kanë si origjinë {{origin}},{{br}}{{importance}} ekziston një filtër përjashtues i ngjashëm.", "description":"Used in the static filtering wizard" }, "loggerStaticFilteringSentencePartBlock":{ @@ -464,7 +464,7 @@ "description":"Used in the static filtering wizard" }, "loggerStaticFilteringSentencePartNotImportant":{ - "message":"përveç kur", + "message":"përveçse kur", "description":"Used in the static filtering wizard" }, "loggerStaticFilteringSentencePartImportant":{ @@ -492,7 +492,7 @@ "description":"English: Contributors" }, "aboutBackupDataButton":{ - "message":"Kopjoj në skedë", + "message":"Kopjoj në skedar", "description":"English: Backup to file" }, "aboutBackupFilename":{ @@ -500,7 +500,7 @@ "description":"English: my-ublock-backup_{{datetime}}.txt" }, "aboutRestoreDataButton":{ - "message":"Rindërtoj sipas skedës...", + "message":"Rindërtoj sipas skedarit...", "description":"English: Restore from file..." }, "aboutResetDataButton":{ @@ -508,7 +508,7 @@ "description":"English: Reset to default settings..." }, "aboutRestoreDataConfirm":{ - "message":"Të gjithë parametrat do të mbishkruhen me të dhënat e kopjuara më {{time}}, dhe uBlock do të rifillojë.\n\nDo i mbishkruani parametrat aktualë?", + "message":"Të gjithë parametrat do të mbishkruhen me të dhënat e kopjuara më {{time}}, dhe uBlock₀ do të hapet përsëri.\n\nDo i mbishkruani parametrat aktualë?", "description":"Message asking user to confirm restore" }, "aboutRestoreDataError":{ @@ -516,7 +516,7 @@ "description":"Message to display when an error occurred during restore" }, "aboutResetDataConfirm":{ - "message":"Të gjithë parametrat do të fshihen dhe uBlock do të rifillojë.\n\nDo ktheni parametrat origjinalë?", + "message":"Të gjithë parametrat do të fshihen dhe uBlock₀ do të hapet përsëri.\n\nDo ktheni parametrat origjinalë?", "description":"Message asking user to confirm reset" }, "errorCantConnectTo":{ @@ -524,7 +524,7 @@ "description":"English: Network error: unable to connect to {{url}}" }, "subscriberConfirm":{ - "message":"uBlock: Do e shtoni këtë adresën në listën e filtrave tuaj?\n\nTitulli: \"{{title}}\"\nURL: {{url}}", + "message":"uBlock₀: Do e shtoni këtë adresën në listën e filtrave tuaj?\n\nTitulli: \"{{title}}\"\nURL: {{url}}", "description":"English: The message seen by the user to confirm subscription to a ABP filter list" }, "elapsedOneMinuteAgo":{ @@ -564,7 +564,7 @@ "description":"Firefox-specific: appears as 'uBlock₀ (off)'" }, "docblockedPrompt1":{ - "message":"uBlock e pengoi hapjen e faqes:", + "message":"uBlock Origin e pengoi hapjen e faqes:", "description":"English: uBlock₀ has prevented the following page from loading:" }, "docblockedPrompt2":{ @@ -572,7 +572,7 @@ "description":"English: Because of the following filter" }, "docblockedNoParamsPrompt":{ - "message":"without parameters", + "message":"pa parametra", "description":"label to be used for the parameter-less URL" }, "docblockedFoundIn":{ @@ -600,11 +600,11 @@ "description":"English: Permanently" }, "cloudPush":{ - "message":"Export to cloud storage", + "message":"Eksportoj në renë informatike", "description":"tooltip" }, "cloudPull":{ - "message":"Import from cloud storage", + "message":"Importoj nga reja informatike", "description":"tooltip" }, "cloudNoData":{ @@ -612,11 +612,11 @@ "description":"" }, "cloudDeviceNamePrompt":{ - "message":"This device name:", + "message":"Emri i aparatit:", "description":"used as a prompt for the user to provide a custom device name" }, "genericSubmit":{ - "message":"Submit", + "message":"Parashtroj", "description":"for generic 'submit' buttons" }, "genericRevert":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"bytes", + "message":"bajt", "description":"" }, "dummy":{ diff --git a/src/_locales/uk/messages.json b/src/_locales/uk/messages.json index 5989236..9e6f2de 100644 --- a/src/_locales/uk/messages.json +++ b/src/_locales/uk/messages.json @@ -176,7 +176,7 @@ "description":"English: Color-blind friendly" }, "settingsCloudStorageEnabledPrompt":{ - "message":"Увімкнути підтримку хмаринкового сховища", + "message":"Увімкнути підтримку хмарного сховища", "description":"" }, "settingsAdvancedUserPrompt":{ @@ -600,11 +600,11 @@ "description":"English: Permanently" }, "cloudPush":{ - "message":"Експортувати до хмаринкового сховища", + "message":"Експортувати до хмарного сховища", "description":"tooltip" }, "cloudPull":{ - "message":"Імпортувати із хмаринкового сховища", + "message":"Імпортувати із хмарного сховища", "description":"tooltip" }, "cloudNoData":{ @@ -624,7 +624,7 @@ "description":"for generic 'revert' buttons" }, "genericBytes":{ - "message":"байти", + "message":"байтів", "description":"" }, "dummy":{ -- cgit v1.1 From 2cd47098b183995e6cc010db09f687d36a667e31 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 16 Oct 2015 11:42:45 -0400 Subject: this fixes #835 --- src/js/reverselookup-worker.js | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/js/reverselookup-worker.js b/src/js/reverselookup-worker.js index b82f9ea..946001c 100644 --- a/src/js/reverselookup-worker.js +++ b/src/js/reverselookup-worker.js @@ -31,25 +31,35 @@ var listEntries = Object.create(null); // Helpers -var rescape = function(s) { +var reEscape = function(s) { return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); }; +var reSpecialChars = /[\*\^\t\v\n]/; + /******************************************************************************/ var fromNetFilter = function(details) { var lists = []; - var entry, pos; + var compiledFilter = details.compiledFilter; + var entry, content, pos, c; for ( var path in listEntries ) { entry = listEntries[path]; if ( entry === undefined ) { continue; } - pos = entry.content.indexOf(details.compiledFilter); + content = entry.content; + pos = content.indexOf(compiledFilter); if ( pos === -1 ) { continue; } + // https://github.com/gorhill/uBlock/issues/835 + // We need an exact match. + c = content.charAt(pos + compiledFilter.length); + if ( c !== '' && reSpecialChars.test(c) === false ) { + continue; + } lists.push({ title: entry.title, supportURL: entry.supportURL @@ -103,16 +113,16 @@ var fromCosmeticFilter = function(details) { var matches = rePlainSelector.exec(filter); if ( matches ) { if ( matches[0] === filter ) { // simple CSS selector - reStr = rescape('c\vlg\v' + filter); + reStr = reEscape('c\vlg\v' + filter); } else { // complex CSS selector - reStr = rescape('c\vlg+\v' + matches[0] + '\v' + filter); + reStr = reEscape('c\vlg+\v' + matches[0] + '\v' + filter); } } else if ( reHighLow.test(filter) ) { // [alt] or [title] - reStr = rescape('c\vhlg0\v' + filter); + reStr = reEscape('c\vhlg0\v' + filter); } else if ( reHighMedium.test(filter) ) { // [href^="..."] - reStr = rescape('c\vhmg0\v') + '[a-z.-]+' + rescape('\v') + '[a-z]*' + rescape(filter); + reStr = reEscape('c\vhmg0\v') + '[a-z.-]+' + reEscape('\v') + '[a-z]*' + reEscape(filter); } else { // all else - reStr = rescape('c\vhhg0\v' + filter); + reStr = reEscape('c\vhhg0\v' + filter); } candidates[details.rawFilter] = new RegExp(reStr + '(?:\\n|$)'); @@ -125,9 +135,9 @@ var fromCosmeticFilter = function(details) { if ( hostname !== '' ) { for ( ;; ) { candidates[hostname + '##' + filter] = new RegExp( - rescape('c\vh\v') + + reEscape('c\vh\v') + '\\w+' + - rescape('\v' + hostname + '\v' + filter) + + reEscape('\v' + hostname + '\v' + filter) + '(?:\\n|$)' ); // If there is no valid domain, there won't be any other @@ -152,7 +162,7 @@ var fromCosmeticFilter = function(details) { if ( pos !== -1 ) { var entity = domain.slice(0, pos); candidates[entity + '.*##' + filter] = new RegExp( - rescape('c\ve\v' + entity + '\v' + filter) + + reEscape('c\ve\v' + entity + '\v' + filter) + '(?:\\n|$)' ); } -- cgit v1.1 From 9559b6462ccc50fa805cfda55a64b1ff980093d4 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 16 Oct 2015 12:38:31 -0400 Subject: added @M-Reimer --- platform/firefox/install.rdf | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/firefox/install.rdf b/platform/firefox/install.rdf index 034679a..97ad142 100644 --- a/platform/firefox/install.rdf +++ b/platform/firefox/install.rdf @@ -9,6 +9,7 @@ {author} Deathamns Alex Vallat + Manuel Reimer 2 true true -- cgit v1.1 From 230639d959468fc67c7ca5cf0249009eee0853b8 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 16 Oct 2015 16:21:46 -0400 Subject: bumping max version for SeaMonkey to 2.38 --- platform/firefox/install.rdf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/firefox/install.rdf b/platform/firefox/install.rdf index 97ad142..5f5b7ec 100644 --- a/platform/firefox/install.rdf +++ b/platform/firefox/install.rdf @@ -39,7 +39,7 @@ {{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}} 2.21 - 2.37 + 2.38 -- cgit v1.1