diff --git a/src/css/3p-filters.css b/src/css/3p-filters.css
index a5052ca45d4fa..359ab709e5b61 100644
--- a/src/css/3p-filters.css
+++ b/src/css/3p-filters.css
@@ -23,7 +23,7 @@ body.hideUnused #listsOfBlockedHostsPrompt:before {
padding-left: 0.5em;
padding-right: 0em;
}
-body[dir=rtl] #lists {
+body[dir="rtl"] #lists {
padding-left: 0em;
padding-right: 0.5em;
}
@@ -57,12 +57,12 @@ li.listEntry {
line-height: 150%;
margin: 0 auto 0 auto;
margin-left: 2.5em;
- margin-right: 0em;
+ margin-right: 0;
text-indent: -2em;
}
-body[dir=rtl] li.listEntry {
+body[dir="rtl"] li.listEntry {
margin-left: 0em;
- margin-right: 1em;
+ margin-right: 2.5em;
}
li.listEntry > * {
margin-right: 0.5em;
diff --git a/src/js/3p-filters.js b/src/js/3p-filters.js
index f43cb8bd364c4..57cccf2f6ae16 100644
--- a/src/js/3p-filters.js
+++ b/src/js/3p-filters.js
@@ -91,7 +91,7 @@ var renderFilterLists = function(soft) {
elem = li.querySelector('a:nth-of-type(1)');
elem.setAttribute('href', 'asset-viewer.html?url=' + encodeURI(listKey));
elem.setAttribute('type', 'text/html');
- elem.textContent = listNameFromListKey(listKey) + '\u200E';
+ elem.textContent = listNameFromListKey(listKey);
li.classList.remove('toRemove');
if ( entry.supportName ) {
li.classList.add('support');
From c2a3ff141be9b5d5e85c55d5f54973c76e411518 Mon Sep 17 00:00:00 2001
From: gorhill
Date: Tue, 24 Jan 2017 16:58:27 -0500
Subject: [PATCH 30/45] translation work from
https://crowdin.com/project/ublock
---
dist/description/description-hi.txt | 28 ++++++++++++++--------------
src/_locales/bg/messages.json | 2 +-
src/_locales/el/messages.json | 2 +-
src/_locales/et/messages.json | 2 +-
src/_locales/fi/messages.json | 2 +-
src/_locales/hi/messages.json | 2 +-
src/_locales/id/messages.json | 2 +-
src/_locales/it/messages.json | 2 +-
src/_locales/ko/messages.json | 2 +-
src/_locales/lv/messages.json | 8 ++++----
src/_locales/pt_BR/messages.json | 2 +-
src/_locales/pt_PT/messages.json | 8 ++++----
src/_locales/sr/messages.json | 2 +-
src/_locales/vi/messages.json | 2 +-
src/_locales/zh_CN/messages.json | 2 +-
15 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/dist/description/description-hi.txt b/dist/description/description-hi.txt
index 6bb418ca3f6f3..33caf12a383ed 100644
--- a/dist/description/description-hi.txt
+++ b/dist/description/description-hi.txt
@@ -1,28 +1,28 @@
-An efficient blocker: easy on memory and CPU footprint, and yet can load and enforce thousands more filters than other popular blockers out there.
+एक कुशल अवरोधक: स्मृति और सीपीयू पदचिह्न पर आसान है, और अभी तक लोड और हजारों लागू वहाँ से बाहर अन्य लोकप्रिय ब्लॉकर्स और अधिक से अधिक फिल्टर कर सकते हैं।
अपनी क्षमता का सचित्र अवलोकन: https://github.com/gorhill/uBlock/wiki/uBlock-vs.-ABP:-efficiency-compared
-Usage: The big power button in the popup is to permanently disable/enable uBlock for the current web site. It applies to the current web site only, it is not a global power button.
+उपयोग: पॉपअप में बड़ी शक्ति बटन स्थायी रूप से अक्षम / वर्तमान वेब साइट uBlock लिए सक्षम है। यह केवल मौजूदा वेब साइट पर लागू होता है, यह एक वैश्विक शक्ति बटन नहीं है।
***
-Flexible, it's more than an "ad blocker": it can also read and create filters from hosts files.
+लचीले, यह एक केवल "विज्ञापन अवरोधक" की तुलना से अधिक है: यह भी पढ़ सकता हैं और मेजबान फाइलों से फिल्टर बना सकते हैं।
Out of the box, these lists of filters are loaded and enforced:
-- EasyList
-- Peter Lowe’s Ad server list
-- EasyPrivacy
-- Malware domains
+- आसान सूची
+- Peter Lowe's विज्ञापन सर्वर सूची
+- आसान गुप्तता
+- मैलवेयर डोमेन
-More lists are available for you to select if you wish:
+यदि आप चाहें तो आप का चयन करने के लिए और अधिक सूची उपलब्ध हैं
-- Fanboy’s Enhanced Tracking List
-- Dan Pollock’s hosts file
-- hpHosts’s Ad and tracking servers
-- MVPS HOSTS
-- Spam404
-- And many others
+- Fanboy's बढ़ी ट्रैकिंग सूची
+- Dan Pollock's मेजबान फ़ाइल
+- hpHosts's विज्ञापन और ट्रैकिंग सर्वर
+- MVPS मेज़बान
+-स्पैम404
+- और बहुत सारे
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.
diff --git a/src/_locales/bg/messages.json b/src/_locales/bg/messages.json
index 782775f42dbc6..9a607eb4f3682 100644
--- a/src/_locales/bg/messages.json
+++ b/src/_locales/bg/messages.json
@@ -680,7 +680,7 @@
"description":"used as a prompt for the user to provide a custom device name"
},
"advancedSettingsWarning":{
- "message":"Внимание! Променяте тези настройки на свой собствен риск.",
+ "message":"Внимание! Променяте настройките на свой собствен риск.",
"description":"A warning to users at the top of 'Advanced settings' page"
},
"genericSubmit":{
diff --git a/src/_locales/el/messages.json b/src/_locales/el/messages.json
index ad9818a10af18..1cea6f934bc98 100644
--- a/src/_locales/el/messages.json
+++ b/src/_locales/el/messages.json
@@ -292,7 +292,7 @@
"description":"This will cause uBO to ignore all generic cosmetic filters."
},
"3pIgnoreGenericCosmeticFiltersInfo":{
- "message":"Generic cosmetic filters are those cosmetic filters which are meant to apply on all web sites.
Though handled efficiently by uBlock₀, generic cosmetic filters may still contribute measurable memory and CPU overhead on some web pages, especially for large and long-lived ones.
Enabling this option will eliminate the memory and CPU overhead added to web pages as a result of handling generic cosmetic filters, and also lower the memory footprint of uBlock₀ itself.
It is recommended to enable this option on less powerful devices.",
+ "message":"
Τα γενικά κοσμητικά φίλτρα είναι εκείνα τα κοσμητικά φίλτρα που εφαρμόζονται σε όλες τις ιστοσελίδες.
Αν και γίνεται αποτελεσματική διαχείρισή τους από το uBlock₀, τα γενικά κοσμητικά φίλτρα ενδέχεται να καταναλώσουν σημαντική μνήμη και να υπερφορτώσουν τη CPU σε μερικές ιστοσελίδες, ειδικά για μεγάλες μακροχρόνιες.
Η ενεργοποίηση αυτής της επιλογής θα εξαλείψει την υπερφόρτωση μνήμης και CPU στις ιστοσελίδες ως αποτέλεσμα της διαχείρισης γενικών κοσμητικών φίλτρων, ενώ ενδέχεται να μειώσει την κατανάλωση μνήμης του ίδιου του uBlock₀.
Προτείνεται η ενεργοποίηση αυτής της επιλογής στις λιγότερο ισχυρές συσκευές.",
"description":"Describes the purpose of the 'Ignore generic cosmetic filters' feature."
},
"3pListsOfBlockedHostsHeader":{
diff --git a/src/_locales/et/messages.json b/src/_locales/et/messages.json
index edd521c2f94f1..de3eade6be014 100644
--- a/src/_locales/et/messages.json
+++ b/src/_locales/et/messages.json
@@ -424,7 +424,7 @@
"description":"English: dynamic rule syntax and full documentation."
},
"whitelistPrompt":{
- "message":"Nimekiri domeenidest, millel uBlock₀ keelatakse. Üks domeen rea kohta, vigased domeeninimed eiratakse vaikimisi ning kommenteeritakse välja.",
+ "message":"Valge nimekirja direktiivid määravad, millistel veebilehtedel peaks uBlock Origin keelatud olema. Üks domeen rea kohta. Sobimatuid direktiive vaikselt ignoreeritakse ja kommenteeritakse välja.",
"description":"English: An overview of the content of the dashboard's Whitelist pane."
},
"whitelistImport":{
diff --git a/src/_locales/fi/messages.json b/src/_locales/fi/messages.json
index 6678f3b5e9c2f..efd1f28cc400a 100644
--- a/src/_locales/fi/messages.json
+++ b/src/_locales/fi/messages.json
@@ -616,7 +616,7 @@
"description":"Firefox\/Fennec-specific: Show Dashboard"
},
"showNetworkLogButton":{
- "message":"Näytä Verkkopyyntöjen Loki",
+ "message":"Näytä loki",
"description":"Firefox\/Fennec-specific: Show Logger"
},
"fennecMenuItemBlockingOff":{
diff --git a/src/_locales/hi/messages.json b/src/_locales/hi/messages.json
index 2777ccbb282bc..d52d1536616d9 100644
--- a/src/_locales/hi/messages.json
+++ b/src/_locales/hi/messages.json
@@ -40,7 +40,7 @@
"description":"appears as tab name in dashboard"
},
"advancedSettingsPageName":{
- "message":"Advanced settings",
+ "message":"उन्नत सेटिंग्स",
"description":"Title for the advanced settings page"
},
"popupPowerSwitchInfo":{
diff --git a/src/_locales/id/messages.json b/src/_locales/id/messages.json
index e17a97b95e0b2..6f9362d2940a0 100644
--- a/src/_locales/id/messages.json
+++ b/src/_locales/id/messages.json
@@ -424,7 +424,7 @@
"description":"English: dynamic rule syntax and full documentation."
},
"whitelistPrompt":{
- "message":"Daftar nama host yang mana uBlock₀ akan dinonfungsikan. Satu entri per baris. Nama host yang tidak valid akan diabaikan tanpa peringatan.",
+ "message":"Daftar putih domain atau halaman, uBlock Origin akan dinonaktifkan. Satu entri per baris. Entri yang tidak valid akan diabaikan dan dijadikan komentar.",
"description":"English: An overview of the content of the dashboard's Whitelist pane."
},
"whitelistImport":{
diff --git a/src/_locales/it/messages.json b/src/_locales/it/messages.json
index 22b31136dd3a6..594851c70ddd8 100644
--- a/src/_locales/it/messages.json
+++ b/src/_locales/it/messages.json
@@ -680,7 +680,7 @@
"description":"used as a prompt for the user to provide a custom device name"
},
"advancedSettingsWarning":{
- "message":"Attenzione! Cambia queste impostazioni a tuo rischio.",
+ "message":"Attenzione! Cambia queste impostazioni avanzate a tuo rischio e pericolo.",
"description":"A warning to users at the top of 'Advanced settings' page"
},
"genericSubmit":{
diff --git a/src/_locales/ko/messages.json b/src/_locales/ko/messages.json
index f8466f176dd2f..83ed0caa5514f 100644
--- a/src/_locales/ko/messages.json
+++ b/src/_locales/ko/messages.json
@@ -424,7 +424,7 @@
"description":"English: dynamic rule syntax and full documentation."
},
"whitelistPrompt":{
- "message":"목록에 있는 호스트들은 uBlock₀에서 비활성화됩니다. 한 줄에 한 개씩 입력하세요. 존재하지 않는 호스트는 자동으로 무시됩니다.",
+ "message":"목록에 있는 호스트들은 uBlock₀에서 비활성화됩니다. 한 줄에 한 개씩 입력하세요. 존재하지 않는 호스트는 무시 및 주석 처리됩니다.",
"description":"English: An overview of the content of the dashboard's Whitelist pane."
},
"whitelistImport":{
diff --git a/src/_locales/lv/messages.json b/src/_locales/lv/messages.json
index d137cd2decd3a..b7b96f754a7dd 100644
--- a/src/_locales/lv/messages.json
+++ b/src/_locales/lv/messages.json
@@ -40,7 +40,7 @@
"description":"appears as tab name in dashboard"
},
"advancedSettingsPageName":{
- "message":"Advanced settings",
+ "message":"Papildu iestatījumi",
"description":"Title for the advanced settings page"
},
"popupPowerSwitchInfo":{
@@ -212,7 +212,7 @@
"description":""
},
"settingsAdvancedUserSettings":{
- "message":"advanced settings",
+ "message":"papildu iestatījumi",
"description":"For the tooltip of a link which gives access to advanced settings"
},
"settingsPrefetchingDisabledPrompt":{
@@ -288,7 +288,7 @@
"description":"Describes the purpose of the 'Parse and enforce cosmetic filters' feature."
},
"3pIgnoreGenericCosmeticFilters":{
- "message":"Ignore generic cosmetic filters",
+ "message":"Ignorēt vispārīgos kosmētiskos filtrus",
"description":"This will cause uBO to ignore all generic cosmetic filters."
},
"3pIgnoreGenericCosmeticFiltersInfo":{
@@ -540,7 +540,7 @@
"description":"English: project' wiki on Github"
},
"aboutSupport":{
- "message":"Support",
+ "message":"Atbalsts",
"description":"A link for where to get support"
},
"aboutCode":{
diff --git a/src/_locales/pt_BR/messages.json b/src/_locales/pt_BR/messages.json
index a642797772981..ecdf542ae01a0 100644
--- a/src/_locales/pt_BR/messages.json
+++ b/src/_locales/pt_BR/messages.json
@@ -424,7 +424,7 @@
"description":"English: dynamic rule syntax and full documentation."
},
"whitelistPrompt":{
- "message":"Sua lista de exceções de servidores para qual o uBlock₀ será desativado. Uma entrada por linha. Servidores inválidos serão silenciosamente ignorados.",
+ "message":"Sua lista branca de servidores para qual o uBlock Origin será desativado. Uma regra por linha. Servidores inválidos serão silenciosamente ignorados.",
"description":"English: An overview of the content of the dashboard's Whitelist pane."
},
"whitelistImport":{
diff --git a/src/_locales/pt_PT/messages.json b/src/_locales/pt_PT/messages.json
index b0bd15256d2e2..e2d63b466d109 100644
--- a/src/_locales/pt_PT/messages.json
+++ b/src/_locales/pt_PT/messages.json
@@ -84,7 +84,7 @@
"description":"Tooltip for the no-popups per-site switch"
},
"popupTipNoLargeMedia":{
- "message":"Alternar o bloqueio de grandes elementos multimédia para este site",
+ "message":"Alternar o bloqueio de elementos multimédia grandes para este site",
"description":"Tooltip for the no-large-media per-site switch"
},
"popupTipNoCosmeticFiltering":{
@@ -144,7 +144,7 @@
"description":""
},
"popupHitDomainCountPrompt":{
- "message":"domínios conectados",
+ "message":"domínios ligados",
"description":"appears in popup"
},
"popupHitDomainCount":{
@@ -640,7 +640,7 @@
"description":"English: List of filter list names follows"
},
"docblockedBack":{
- "message":"Recuar",
+ "message":"Retroceder",
"description":"English: Go back"
},
"docblockedClose":{
@@ -700,7 +700,7 @@
"description":""
},
"contextMenuTemporarilyAllowLargeMediaElements":{
- "message":"Permitir temporariamente grandes elementos multimédia",
+ "message":"Permitir temporariamente elementos multimédia grandes",
"description":"A context menu entry, present when large media elements have been blocked on the current site"
},
"dummy":{
diff --git a/src/_locales/sr/messages.json b/src/_locales/sr/messages.json
index 9e060b20bb341..aef2d92d94501 100644
--- a/src/_locales/sr/messages.json
+++ b/src/_locales/sr/messages.json
@@ -152,7 +152,7 @@
"description":"appears in popup"
},
"pickerCreate":{
- "message":"Направи",
+ "message":"Креирај",
"description":"English: Create"
},
"pickerPick":{
diff --git a/src/_locales/vi/messages.json b/src/_locales/vi/messages.json
index f112d6f706eeb..b4d2248e7bb0e 100644
--- a/src/_locales/vi/messages.json
+++ b/src/_locales/vi/messages.json
@@ -424,7 +424,7 @@
"description":"English: dynamic rule syntax and full documentation."
},
"whitelistPrompt":{
- "message":"Danh sách tên các máy chủ mà uBlock₀ sẽ bị chặn. Một mục nhập trên mỗi dòng. Tên máy chủ không hợp lệ sẽ được tự động bỏ qua.",
+ "message":"Danh sách tên các máy chủ mà µBlock₀ sẽ bị vô hiệu. Một mục nhập trên mỗi dòng. Tên máy chủ không hợp lệ sẽ được tự động bỏ qua.",
"description":"English: An overview of the content of the dashboard's Whitelist pane."
},
"whitelistImport":{
diff --git a/src/_locales/zh_CN/messages.json b/src/_locales/zh_CN/messages.json
index 9a753bad9c379..1d5fe1c75f8c7 100644
--- a/src/_locales/zh_CN/messages.json
+++ b/src/_locales/zh_CN/messages.json
@@ -424,7 +424,7 @@
"description":"English: dynamic rule syntax and full documentation."
},
"whitelistPrompt":{
- "message":"uBlock₀ 在列表里的城名将会停用。一行一条规则。无效的城名将直接被忽略。",
+ "message":"您的列表中针对 µBlock 的主机名将被禁用。每行一条规则。无效的主机名将直接被忽略。",
"description":"English: An overview of the content of the dashboard's Whitelist pane."
},
"whitelistImport":{
From 18096366808f7b49153e92f544e81468aa8a9482 Mon Sep 17 00:00:00 2001
From: gorhill
Date: Wed, 25 Jan 2017 08:05:41 -0500
Subject: [PATCH 31/45] fix #2337
---
platform/firefox/vapi-background.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js
index 742a99258f2ff..c9cc54b83c031 100644
--- a/platform/firefox/vapi-background.js
+++ b/platform/firefox/vapi-background.js
@@ -274,7 +274,11 @@ vAPI.browserSettings = {
// has a `media.peerconnection.ice.default_address_only` pref which
// purpose is to prevent local IP address leakage.
case 'webrtcIPAddress':
- if ( this.getValue('media.peerconnection', 'ice.default_address_only') !== undefined ) {
+ // https://github.com/gorhill/uBlock/issues/2337
+ if ( this.getValue('media.peerconnection', 'ice.no_host') !== undefined ) {
+ prefName = 'ice.no_host';
+ prefVal = true;
+ } else if ( this.getValue('media.peerconnection', 'ice.default_address_only') !== undefined ) {
prefName = 'ice.default_address_only';
prefVal = true;
} else {
From d79a781bea6872c8a12a1b284de518d7762c4a99 Mon Sep 17 00:00:00 2001
From: gorhill
Date: Wed, 25 Jan 2017 09:21:16 -0500
Subject: [PATCH 32/45] report blanket websocket blocking once only
---
src/js/traffic.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/js/traffic.js b/src/js/traffic.js
index 6e4587d0fca45..29918bfbe0073 100644
--- a/src/js/traffic.js
+++ b/src/js/traffic.js
@@ -457,7 +457,7 @@ var processCSP = function(pageStore, details) {
);
}
- if ( loggerEnabled ) {
+ if ( loggerEnabled && details.type !== 'script' ) {
if ( blockInlineScript !== undefined ) {
µb.logger.writeOne(
tabId,
From 393d0b2d0887812161fe7ede066a0766e9610bc3 Mon Sep 17 00:00:00 2001
From: gorhill
Date: Wed, 25 Jan 2017 09:21:44 -0500
Subject: [PATCH 33/45] new revision or dev build
---
platform/chromium/manifest.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json
index 6b233209d3043..07989cebbac84 100644
--- a/platform/chromium/manifest.json
+++ b/platform/chromium/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "uBlock Origin",
- "version": "1.10.5.101",
+ "version": "1.10.7.100",
"default_locale": "en",
"description": "__MSG_extShortDesc__",
From aadf4a6427fa2960b4fb9e20cfbaab66e2642d81 Mon Sep 17 00:00:00 2001
From: gorhill
Date: Thu, 26 Jan 2017 10:17:38 -0500
Subject: [PATCH 34/45] fix #2340
---
src/js/assets.js | 182 ++++++++++++++++++++++----------------------
src/js/messaging.js | 19 ++---
src/js/start.js | 14 +++-
src/js/storage.js | 81 +++++++++-----------
4 files changed, 147 insertions(+), 149 deletions(-)
diff --git a/src/js/assets.js b/src/js/assets.js
index ba83f5d141a16..1e13848cfec66 100644
--- a/src/js/assets.js
+++ b/src/js/assets.js
@@ -137,72 +137,74 @@ var getTextFileFromURL = function(url, onLoad, onError) {
**/
api.listKeyAliases = {
- "assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat": "public_suffix_list.dat",
- "assets/user/filters.txt": "user-filters",
- "assets/ublock/resources.txt": "ublock-resources",
- "assets/ublock/filters.txt": "ublock-filters",
- "assets/ublock/privacy.txt": "ublock-privacy",
- "assets/ublock/unbreak.txt": "ublock-unbreak",
- "assets/ublock/badware.txt": "ublock-badware",
- "assets/ublock/experimental.txt": "ublock-experimental",
- "https://easylist-downloads.adblockplus.org/easylistchina.txt": "CHN-0",
- "https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjxlist.txt": "CHN-1",
- "https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjx-annoyance.txt": "CHN-2",
- "https://easylist-downloads.adblockplus.org/easylistgermany.txt": "DEU-0",
- "https://adblock.dk/block.csv": "DNK-0",
- "assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt": "easylist",
- "https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt": "easylist-nocosmetic",
- "assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt": "easyprivacy",
- "https://easylist-downloads.adblockplus.org/fanboy-annoyance.txt": "fanboy-annoyance",
- "https://easylist-downloads.adblockplus.org/fanboy-social.txt": "fanboy-social",
- "https://easylist-downloads.adblockplus.org/liste_fr.txt": "FRA-0",
- "http://adblock.gardar.net/is.abp.txt": "ISL-0",
- "https://easylist-downloads.adblockplus.org/easylistitaly.txt": "ITA-0",
- "https://dl.dropboxusercontent.com/u/1289327/abpxfiles/filtri.txt": "ITA-1",
- "https://easylist-downloads.adblockplus.org/advblock.txt": "RUS-0",
- "https://easylist-downloads.adblockplus.org/bitblock.txt": "RUS-1",
- "https://filters.adtidy.org/extension/chromium/filters/1.txt": "RUS-2",
- "https://adguard.com/en/filter-rules.html?id=1": "RUS-2",
- "https://easylist-downloads.adblockplus.org/easylistdutch.txt": "NLD-0",
- "https://notabug.org/latvian-list/adblock-latvian/raw/master/lists/latvian-list.txt": "LVA-0",
- "http://hosts-file.net/.%5Cad_servers.txt": "hphosts",
- "http://adblock.ee/list.php": "EST-0",
- "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt": "disconnect-malvertising",
- "https://s3.amazonaws.com/lists.disconnect.me/simple_malware.txt": "disconnect-malware",
- "https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt": "disconnect-tracking",
- "https://www.certyficate.it/adblock/adblock.txt": "POL-0",
- "https://easylist-downloads.adblockplus.org/antiadblockfilters.txt": "awrl-0",
- "http://adb.juvander.net/Finland_adb.txt": "FIN-0",
- "https://raw.githubusercontent.com/gfmaster/adblock-korea-contrib/master/filter.txt": "KOR-0",
- "https://raw.githubusercontent.com/yous/YousList/master/youslist.txt": "KOR-1",
- "https://www.fanboy.co.nz/fanboy-korean.txt": "KOR-2",
- "https://raw.githubusercontent.com/heradhis/indonesianadblockrules/master/subscriptions/abpindo.txt": "IDN-0",
- "https://raw.githubusercontent.com/k2jp/abp-japanese-filters/master/abpjf.txt": "JPN-0",
- "https://raw.githubusercontent.com/liamja/Prebake/master/obtrusive.txt": "EU-prebake",
- "https://easylist-downloads.adblockplus.org/Liste_AR.txt": "ara-0",
- "http://margevicius.lt/easylistlithuania.txt": "LTU-0",
- "assets/thirdparties/www.malwaredomainlist.com/hostslist/hosts.txt": "malware-0",
- "assets/thirdparties/mirror1.malwaredomains.com/files/justdomains": "malware-1",
- "http://malwaredomains.lehigh.edu/files/immortal_domains.txt": "malware-2",
- "assets/thirdparties/pgl.yoyo.org/as/serverlist": "plowe-0",
- "https://raw.githubusercontent.com/easylist/EasyListHebrew/master/EasyListHebrew.txt": "ISR-0",
- "https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-filters.txt": "reek-0",
- "https://raw.githubusercontent.com/szpeter80/hufilter/master/hufilter.txt": "HUN-0",
- "https://raw.githubusercontent.com/tomasko126/easylistczechandslovak/master/filters.txt": "CZE-0",
- "http://someonewhocares.org/hosts/hosts": "dpollock-0",
- "https://raw.githubusercontent.com/Dawsey21/Lists/master/adblock-list.txt": "spam404-0",
- "http://stanev.org/abp/adblock_bg.txt": "BGR-0",
- "http://winhelp2002.mvps.org/hosts.txt": "mvps-0",
- "https://www.fanboy.co.nz/enhancedstats.txt": "fanboy-enhanced",
- "https://www.fanboy.co.nz/fanboy-antifacebook.txt": "fanboy-thirdparty_social",
- "https://easylist-downloads.adblockplus.org/easylistspanish.txt": "spa-0",
- "https://www.fanboy.co.nz/fanboy-swedish.txt": "SWE-0",
- "https://www.fanboy.co.nz/r/fanboy-ultimate.txt": "fanboy-ultimate",
- "https://filters.adtidy.org/extension/chromium/filters/13.txt": "TUR-0",
- "https://adguard.com/filter-rules.html?id=13": "TUR-0",
- "https://www.fanboy.co.nz/fanboy-vietnam.txt": "VIE-0",
- "https://www.void.gr/kargig/void-gr-filters.txt": "GRC-0",
- "https://raw.githubusercontent.com/betterwebleon/slovenian-list/master/filters.txt": "SVN-0"
+ "assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat": "public_suffix_list.dat",
+ "assets/user/filters.txt": "user-filters",
+ "assets/ublock/resources.txt": "ublock-resources",
+ "assets/ublock/filters.txt": "ublock-filters",
+ "assets/ublock/privacy.txt": "ublock-privacy",
+ "assets/ublock/unbreak.txt": "ublock-unbreak",
+ "assets/ublock/badware.txt": "ublock-badware",
+ "assets/ublock/experimental.txt": "ublock-experimental",
+ "https://easylist-downloads.adblockplus.org/easylistchina.txt": "CHN-0",
+ "https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjxlist.txt": "CHN-1",
+ "https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjx-annoyance.txt": "CHN-2",
+ "https://easylist-downloads.adblockplus.org/easylistgermany.txt": "DEU-0",
+ "https://adblock.dk/block.csv": "DNK-0",
+ "assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt": "easylist",
+ "https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt": "easylist-nocosmetic",
+ "assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt": "easyprivacy",
+ "https://easylist-downloads.adblockplus.org/fanboy-annoyance.txt": "fanboy-annoyance",
+ "https://easylist-downloads.adblockplus.org/fanboy-social.txt": "fanboy-social",
+ "https://easylist-downloads.adblockplus.org/liste_fr.txt": "FRA-0",
+ "http://adblock.gardar.net/is.abp.txt": "ISL-0",
+ "https://easylist-downloads.adblockplus.org/easylistitaly.txt": "ITA-0",
+ "https://dl.dropboxusercontent.com/u/1289327/abpxfiles/filtri.txt": "ITA-1",
+ "https://easylist-downloads.adblockplus.org/advblock.txt": "RUS-0",
+ "https://easylist-downloads.adblockplus.org/bitblock.txt": "RUS-1",
+ "https://filters.adtidy.org/extension/chromium/filters/1.txt": "RUS-2",
+ "https://adguard.com/en/filter-rules.html?id=1": "RUS-2",
+ "https://easylist-downloads.adblockplus.org/easylistdutch.txt": "NLD-0",
+ "https://notabug.org/latvian-list/adblock-latvian/raw/master/lists/latvian-list.txt": "LVA-0",
+ "http://hosts-file.net/.%5Cad_servers.txt": "hphosts",
+ "http://adblock.ee/list.php": "EST-0",
+ "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt": "disconnect-malvertising",
+ "https://s3.amazonaws.com/lists.disconnect.me/simple_malware.txt": "disconnect-malware",
+ "https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt": "disconnect-tracking",
+ "https://www.certyficate.it/adblock/adblock.txt": "POL-0",
+ "https://raw.githubusercontent.com/MajkiIT/polish-ads-filter/master/polish-adblock-filters/adblock.txt": "POL-0",
+ "https://easylist-downloads.adblockplus.org/antiadblockfilters.txt": "awrl-0",
+ "http://adb.juvander.net/Finland_adb.txt": "FIN-0",
+ "https://raw.githubusercontent.com/gfmaster/adblock-korea-contrib/master/filter.txt": "KOR-0",
+ "https://raw.githubusercontent.com/yous/YousList/master/youslist.txt": "KOR-1",
+ "https://www.fanboy.co.nz/fanboy-korean.txt": "KOR-2",
+ "https://raw.githubusercontent.com/heradhis/indonesianadblockrules/master/subscriptions/abpindo.txt": "IDN-0",
+ "https://raw.githubusercontent.com/ABPindo/indonesianadblockrules/master/subscriptions/abpindo.txt": "IDN-0",
+ "https://raw.githubusercontent.com/k2jp/abp-japanese-filters/master/abpjf.txt": "JPN-0",
+ "https://raw.githubusercontent.com/liamja/Prebake/master/obtrusive.txt": "EU-prebake",
+ "https://easylist-downloads.adblockplus.org/Liste_AR.txt": "ara-0",
+ "http://margevicius.lt/easylistlithuania.txt": "LTU-0",
+ "assets/thirdparties/www.malwaredomainlist.com/hostslist/hosts.txt": "malware-0",
+ "assets/thirdparties/mirror1.malwaredomains.com/files/justdomains": "malware-1",
+ "http://malwaredomains.lehigh.edu/files/immortal_domains.txt": "malware-2",
+ "assets/thirdparties/pgl.yoyo.org/as/serverlist": "plowe-0",
+ "https://raw.githubusercontent.com/easylist/EasyListHebrew/master/EasyListHebrew.txt": "ISR-0",
+ "https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-filters.txt": "reek-0",
+ "https://raw.githubusercontent.com/szpeter80/hufilter/master/hufilter.txt": "HUN-0",
+ "https://raw.githubusercontent.com/tomasko126/easylistczechandslovak/master/filters.txt": "CZE-0",
+ "http://someonewhocares.org/hosts/hosts": "dpollock-0",
+ "https://raw.githubusercontent.com/Dawsey21/Lists/master/adblock-list.txt": "spam404-0",
+ "http://stanev.org/abp/adblock_bg.txt": "BGR-0",
+ "http://winhelp2002.mvps.org/hosts.txt": "mvps-0",
+ "https://www.fanboy.co.nz/enhancedstats.txt": "fanboy-enhanced",
+ "https://www.fanboy.co.nz/fanboy-antifacebook.txt": "fanboy-thirdparty_social",
+ "https://easylist-downloads.adblockplus.org/easylistspanish.txt": "spa-0",
+ "https://www.fanboy.co.nz/fanboy-swedish.txt": "SWE-0",
+ "https://www.fanboy.co.nz/r/fanboy-ultimate.txt": "fanboy-ultimate",
+ "https://filters.adtidy.org/extension/chromium/filters/13.txt": "TUR-0",
+ "https://adguard.com/filter-rules.html?id=13": "TUR-0",
+ "https://www.fanboy.co.nz/fanboy-vietnam.txt": "VIE-0",
+ "https://www.void.gr/kargig/void-gr-filters.txt": "GRC-0",
+ "https://raw.githubusercontent.com/betterwebleon/slovenian-list/master/filters.txt": "SVN-0"
};
var migrate = function(callback) {
@@ -343,7 +345,7 @@ var saveAssetSourceRegistry = (function() {
};
})();
-var updateAssetSourceRegistry = function(json) {
+var updateAssetSourceRegistry = function(json, silent) {
var newDict;
try {
newDict = JSON.parse(json);
@@ -351,29 +353,29 @@ var updateAssetSourceRegistry = function(json) {
}
if ( newDict instanceof Object === false ) { return; }
- getAssetSourceRegistry(function(oldDict) {
- var assetKey;
- // Remove obsolete entries (only those which were built-in).
- for ( assetKey in oldDict ) {
- if (
- newDict[assetKey] === undefined &&
- oldDict[assetKey].submitter === undefined
- ) {
- unregisterAssetSource(assetKey);
- }
+ var oldDict = assetSourceRegistry,
+ assetKey;
+
+ // Remove obsolete entries (only those which were built-in).
+ for ( assetKey in oldDict ) {
+ if (
+ newDict[assetKey] === undefined &&
+ oldDict[assetKey].submitter === undefined
+ ) {
+ unregisterAssetSource(assetKey);
}
- // Add/update existing entries. Notify of new asset sources.
- for ( assetKey in newDict ) {
- if ( oldDict[assetKey] === undefined ) {
- fireNotification(
- 'builtin-asset-source-added',
- { assetKey: assetKey, entry: newDict[assetKey] }
- );
- }
- registerAssetSource(assetKey, newDict[assetKey]);
+ }
+ // Add/update existing entries. Notify of new asset sources.
+ for ( assetKey in newDict ) {
+ if ( oldDict[assetKey] === undefined && !silent ) {
+ fireNotification(
+ 'builtin-asset-source-added',
+ { assetKey: assetKey, entry: newDict[assetKey] }
+ );
}
- saveAssetSourceRegistry();
- });
+ registerAssetSource(assetKey, newDict[assetKey]);
+ }
+ saveAssetSourceRegistry();
};
var getAssetSourceRegistry = function(callback) {
@@ -406,7 +408,7 @@ var getAssetSourceRegistry = function(callback) {
getTextFileFromURL(
µBlock.assetsBootstrapLocation || 'assets/assets.json',
function() {
- updateAssetSourceRegistry(this.responseText);
+ updateAssetSourceRegistry(this.responseText, true);
registryReady();
}
);
@@ -899,7 +901,7 @@ api.metadata = function(callback) {
});
getAssetCacheRegistry(function() {
- cacheRegistryReady = assetCacheRegistry;
+ cacheRegistryReady = true;
if ( assetRegistryReady ) { onReady(); }
});
};
diff --git a/src/js/messaging.js b/src/js/messaging.js
index 201ddbf2878fc..4549d6c5ba18b 100644
--- a/src/js/messaging.js
+++ b/src/js/messaging.js
@@ -754,27 +754,25 @@ var backupUserData = function(callback) {
timeStamp: Date.now(),
version: vAPI.app.version,
userSettings: µb.userSettings,
- selectedFilterLists: [],
+ selectedFilterLists: µb.selectedFilterLists,
hiddenSettingsString: µb.stringFromHiddenSettings(),
netWhitelist: µb.stringFromWhitelist(µb.netWhitelist),
dynamicFilteringString: µb.permanentFirewall.toString(),
urlFilteringString: µb.permanentURLFiltering.toString(),
hostnameSwitchesString: µb.hnSwitches.toString(),
- userFilters: ''
- };
-
- var onSelectedListsReady = function(selectedFilterLists) {
- userData.selectedFilterLists = selectedFilterLists;
-
+ userFilters: '',
// TODO(seamless migration):
// The following is strictly for convenience, to be minimally
// forward-compatible. This will definitely be removed in the
// short term, as I do not expect the need to install an older
// version of uBO to ever be needed beyond the short term.
// >>>>>>>>
- userData.filterLists = µb.oldDataFromNewListKeys(selectedFilterLists);
+ filterLists: µb.oldDataFromNewListKeys(µb.selectedFilterLists)
// <<<<<<<<
+ };
+ var onUserFiltersReady = function(details) {
+ userData.userFilters = details.content;
var filename = vAPI.i18n('aboutBackupFilename')
.replace('{{datetime}}', µb.dateNowToSensibleString())
.replace(/ +/g, '_');
@@ -789,11 +787,6 @@ var backupUserData = function(callback) {
getLocalData(callback);
};
- var onUserFiltersReady = function(details) {
- userData.userFilters = details.content;
- µb.loadSelectedFilterLists(onSelectedListsReady);
- };
-
µb.assets.get(µb.userFiltersPath, onUserFiltersReady);
};
diff --git a/src/js/start.js b/src/js/start.js
index 2ccd4fc8dc061..8c37217f9b439 100644
--- a/src/js/start.js
+++ b/src/js/start.js
@@ -241,7 +241,7 @@ var fromFetch = function(to, fetched) {
/******************************************************************************/
-var onAdminSettingsRestored = function() {
+var onSelectedFilterListsLoaded = function() {
var fetchableProps = {
'compiledMagic': '',
'dynamicFilteringString': 'behind-the-scene * 3p noop\nbehind-the-scene * 3p-frame noop',
@@ -266,6 +266,18 @@ var onAdminSettingsRestored = function() {
/******************************************************************************/
+// TODO(seamless migration):
+// Eventually selected filter list keys will be loaded as a fetchable
+// property. Until then we need to handle backward and forward
+// compatibility, this means a special asynchronous call to load selected
+// filter lists.
+
+var onAdminSettingsRestored = function() {
+ µb.loadSelectedFilterLists(onSelectedFilterListsLoaded);
+};
+
+/******************************************************************************/
+
µb.hiddenSettings = (function() {
var out = objectAssign({}, µb.hiddenSettingsDefault),
json = vAPI.localStorage.getItem('hiddenSettings');
diff --git a/src/js/storage.js b/src/js/storage.js
index 7d394f52d7589..f914c045237ac 100644
--- a/src/js/storage.js
+++ b/src/js/storage.js
@@ -170,7 +170,12 @@
var µb = this;
vAPI.storage.get([ 'selectedFilterLists', 'remoteBlacklists' ], function(bin) {
if ( !bin || !bin.selectedFilterLists && !bin.remoteBlacklists ) {
- return callback();
+ // Select default filter lists if first-time launch.
+ µb.assets.metadata(function(availableLists) {
+ µb.saveSelectedFilterLists(µb.autoSelectRegionalFilterLists(availableLists));
+ callback();
+ });
+ return;
}
var listKeys = [];
if ( bin.selectedFilterLists ) {
@@ -186,33 +191,30 @@
// Uncomment when all have moved to v1.11 and beyond.
//vAPI.storage.remove('remoteBlacklists');
}
- µb.selectedFilterLists = listKeys.slice();
- callback(listKeys);
+ µb.selectedFilterLists = listKeys;
+ callback();
});
};
µBlock.saveSelectedFilterLists = function(newKeys, append) {
- var µb = this;
- this.loadSelectedFilterLists(function(oldKeys) {
- oldKeys = oldKeys || [];
- if ( append ) {
- newKeys = newKeys.concat(oldKeys);
- }
- var newSet = new Set(newKeys);
- // Purge unused filter lists from cache.
- for ( var i = 0, n = oldKeys.length; i < n; i++ ) {
- if ( newSet.has(oldKeys[i]) === false ) {
- µb.removeFilterList(oldKeys[i]);
- }
+ var oldKeys = this.selectedFilterLists.slice();
+ if ( append ) {
+ newKeys = newKeys.concat(oldKeys);
+ }
+ var newSet = new Set(newKeys);
+ // Purge unused filter lists from cache.
+ for ( var i = 0, n = oldKeys.length; i < n; i++ ) {
+ if ( newSet.has(oldKeys[i]) === false ) {
+ this.removeFilterList(oldKeys[i]);
}
- newKeys = µb.setToArray(newSet);
- var bin = {
- selectedFilterLists: newKeys,
- remoteBlacklists: µb.oldDataFromNewListKeys(newKeys)
- };
- µb.selectedFilterLists = newKeys;
- vAPI.storage.set(bin);
- });
+ }
+ newKeys = this.setToArray(newSet);
+ var bin = {
+ selectedFilterLists: newKeys,
+ remoteBlacklists: this.oldDataFromNewListKeys(newKeys)
+ };
+ this.selectedFilterLists = newKeys;
+ vAPI.storage.set(bin);
};
// TODO(seamless migration):
@@ -429,7 +431,7 @@
µBlock.autoSelectRegionalFilterLists = function(lists) {
var lang = self.navigator.language.slice(0, 2),
- selectedListKeys = [],
+ selectedListKeys = [ this.userFiltersPath ],
list;
for ( var key in lists ) {
if ( lists.hasOwnProperty(key) === false ) { continue; }
@@ -522,26 +524,7 @@
}
};
- // Selected lists.
- var onSelectedListsLoaded = function(keys) {
- var listKey;
- // No user lists data means use default settings.
- if ( Array.isArray(keys) ) {
- var listKeySet = new Set(keys);
- for ( listKey in newAvailableLists ) {
- if ( newAvailableLists.hasOwnProperty(listKey) ) {
- newAvailableLists[listKey].off = !listKeySet.has(listKey);
- }
- }
- } else if ( µb.firstInstall ) {
- µb.saveSelectedFilterLists(µb.autoSelectRegionalFilterLists(newAvailableLists));
- }
-
- finalize();
- callback(newAvailableLists);
- };
-
- // Built-in filter lists.
+ // Built-in filter lists loaded.
var onBuiltinListsLoaded = function(entries) {
for ( var assetKey in entries ) {
if ( entries.hasOwnProperty(assetKey) === false ) { continue; }
@@ -551,7 +534,15 @@
}
// Load set of currently selected filter lists.
- µb.loadSelectedFilterLists(onSelectedListsLoaded);
+ var listKeySet = new Set(µb.selectedFilterLists);
+ for ( listKey in newAvailableLists ) {
+ if ( newAvailableLists.hasOwnProperty(listKey) ) {
+ newAvailableLists[listKey].off = !listKeySet.has(listKey);
+ }
+ }
+
+ finalize();
+ callback(newAvailableLists);
};
// Available lists previously computed.
From 597583265315763347c47b59fb2ff7e9815a5ec7 Mon Sep 17 00:00:00 2001
From: gorhill
Date: Thu, 26 Jan 2017 10:24:28 -0500
Subject: [PATCH 35/45] new release candidate
---
platform/chromium/manifest.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json
index 07989cebbac84..b04c85130c35b 100644
--- a/platform/chromium/manifest.json
+++ b/platform/chromium/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "uBlock Origin",
- "version": "1.10.7.100",
+ "version": "1.10.7.101",
"default_locale": "en",
"description": "__MSG_extShortDesc__",
From 0b4f31bd8aba77c5ee84ce46a095480bb821e9bf Mon Sep 17 00:00:00 2001
From: gorhill
Date: Fri, 27 Jan 2017 13:44:52 -0500
Subject: [PATCH 36/45] fix #2344
---
assets/assets.json | 2 +-
src/js/storage.js | 7 +++----
src/js/utils.js | 12 ++++++++++++
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/assets/assets.json b/assets/assets.json
index e8dc9cd56a40c..305d1b6cdd658 100644
--- a/assets/assets.json
+++ b/assets/assets.json
@@ -529,7 +529,7 @@
"group": "regions",
"off": true,
"title": "RUS: RU AdList (Дополнительная региональная подписка)",
- "lang": "ru",
+ "lang": "be ru uk",
"contentURL": "https://easylist-downloads.adblockplus.org/advblock.txt",
"supportURL": "https://forums.lanik.us/viewforum.php?f=102"
},
diff --git a/src/js/storage.js b/src/js/storage.js
index f914c045237ac..3467282088fa7 100644
--- a/src/js/storage.js
+++ b/src/js/storage.js
@@ -430,8 +430,7 @@
/******************************************************************************/
µBlock.autoSelectRegionalFilterLists = function(lists) {
- var lang = self.navigator.language.slice(0, 2),
- selectedListKeys = [ this.userFiltersPath ],
+ var selectedListKeys = [ this.userFiltersPath ],
list;
for ( var key in lists ) {
if ( lists.hasOwnProperty(key) === false ) { continue; }
@@ -440,7 +439,7 @@
selectedListKeys.push(key);
continue;
}
- if ( list.lang === lang ) {
+ if ( this.matchCurrentLanguage(list.lang) ) {
selectedListKeys.push(key);
list.off = false;
}
@@ -1135,7 +1134,7 @@
if ( details.entry.content === 'filters' ) {
if (
details.entry.off !== true ||
- self.navigator.language.startsWith(details.entry.lang)
+ this.matchCurrentLanguage(details.entry.lang)
) {
this.saveSelectedFilterLists([ details.assetKey ], true);
}
diff --git a/src/js/utils.js b/src/js/utils.js
index 04c9a3e41000c..e7834c3de6a6f 100644
--- a/src/js/utils.js
+++ b/src/js/utils.js
@@ -245,3 +245,15 @@
};
/******************************************************************************/
+
+// https://github.com/gorhill/uBlock/issues/2344
+
+µBlock.matchCurrentLanguage = function(s) {
+ if ( typeof s !== 'string' ) { return false; }
+ if ( this.matchCurrentLanguage.reLang === undefined ) {
+ this.matchCurrentLanguage.reLang = new RegExp('\\b' + self.navigator.language.slice(0, 2) + '\\b');
+ }
+ return this.matchCurrentLanguage.reLang.test(s);
+};
+
+/******************************************************************************/
From 0d2e4f56218e77168fbb98ce476359f489db8f61 Mon Sep 17 00:00:00 2001
From: gorhill
Date: Fri, 27 Jan 2017 13:46:33 -0500
Subject: [PATCH 37/45] new release candidate
---
platform/chromium/manifest.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json
index b04c85130c35b..5c2540e7a23da 100644
--- a/platform/chromium/manifest.json
+++ b/platform/chromium/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "uBlock Origin",
- "version": "1.10.7.101",
+ "version": "1.10.7.102",
"default_locale": "en",
"description": "__MSG_extShortDesc__",
From a0c172c13e689c9df2a7f57ada1e115fa4d3db25 Mon Sep 17 00:00:00 2001
From: gorhill
Date: Sat, 28 Jan 2017 13:42:33 -0500
Subject: [PATCH 38/45] to mitigate
https://github.com/gorhill/uBO-Extra/issues/7
---
platform/chromium/vapi-background.js | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js
index db6b0305ec29c..63290d47b6ab0 100644
--- a/platform/chromium/vapi-background.js
+++ b/platform/chromium/vapi-background.js
@@ -978,15 +978,20 @@ vAPI.net.registerListeners = function() {
// search for "https://github.com/gorhill/uBlock/issues/1497".
var onBeforeWebsocketRequest = function(details) {
details.type = 'websocket';
- var matches = /url=([^&]+)/.exec(details.url);
+ var requestURL = details.url;
+ var matches = /[?&]url=([^&]+)/.exec(requestURL);
details.url = decodeURIComponent(matches[1]);
var r = onBeforeRequestClient(details);
// Blocked?
- if ( r && r.cancel ) {
- return r;
- }
- // Returning a 1x1 transparent pixel means "not blocked".
- return { redirectUrl: 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' };
+ if ( r && r.cancel ) { return r; }
+ // Try to redirect to the URL of an image already present in the
+ // document, or a 1x1 data: URL if none is present.
+ matches = /[?&]r=([^&]+)/.exec(requestURL);
+ return {
+ redirectUrl: matches !== null ?
+ decodeURIComponent(matches[1]) :
+ 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
+ };
};
var onBeforeRequestClient = this.onBeforeRequest.callback;
From ba3127a59b9c46b6c93ee1befd826f3333a8c21f Mon Sep 17 00:00:00 2001
From: gorhill
Date: Wed, 1 Feb 2017 08:59:35 -0500
Subject: [PATCH 39/45] new revision for release candidate
---
platform/chromium/manifest.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json
index 5c2540e7a23da..335f79ab51736 100644
--- a/platform/chromium/manifest.json
+++ b/platform/chromium/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "uBlock Origin",
- "version": "1.10.7.102",
+ "version": "1.10.7.103",
"default_locale": "en",
"description": "__MSG_extShortDesc__",
From 1ba853df8cabc43d143535b4b65ed63a4fe992cc Mon Sep 17 00:00:00 2001
From: gorhill
Date: Wed, 1 Feb 2017 09:05:41 -0500
Subject: [PATCH 40/45] all releases are pre-release by default
---
.travis.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml
index 5f15a9782e3b0..a46f7f9c2113a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,7 @@ env:
script: ./tools/make-${BROWSER}.sh all
deploy:
provider: releases
+ prerelease: true
# https://github.com/travis-ci/travis-ci/issues/6772
edge:
branch: releases-fix
From 60605033bfd252f6b13966b70b3ce1f45849af79 Mon Sep 17 00:00:00 2001
From: gorhill
Date: Fri, 3 Feb 2017 08:12:26 -0500
Subject: [PATCH 41/45] fix #1871? ("blind" fix, need confirmation)
---
src/js/messaging.js | 16 ++++++++++++----
src/js/storage.js | 8 ++++++--
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/src/js/messaging.js b/src/js/messaging.js
index 4549d6c5ba18b..20ec0e3ca11c4 100644
--- a/src/js/messaging.js
+++ b/src/js/messaging.js
@@ -793,6 +793,10 @@ var backupUserData = function(callback) {
var restoreUserData = function(request) {
var userData = request.userData;
+ var restart = function() {
+ vAPI.app.restart();
+ };
+
var onAllRemoved = function() {
µBlock.saveLocalSettings();
vAPI.storage.set(userData.userSettings);
@@ -811,13 +815,17 @@ var restoreUserData = function(request) {
// 'filterLists' is available up to uBO v1.10.4, not beyond.
// 'selectedFilterLists' is available from uBO v1.11 and beyond.
+ var listKeys;
if ( Array.isArray(userData.selectedFilterLists) ) {
- µb.saveSelectedFilterLists(userData.selectedFilterLists);
+ listKeys = userData.selectedFilterLists;
} else if ( userData.filterLists instanceof Object ) {
- µb.saveSelectedFilterLists(µb.newListKeysFromOldData(userData.filterLists));
+ listKeys = µb.newListKeysFromOldData(userData.filterLists);
+ }
+ if ( listKeys !== undefined ) {
+ µb.saveSelectedFilterLists(listKeys, restart);
+ } else {
+ restart();
}
-
- vAPI.app.restart();
};
// https://github.com/chrisaljoudi/uBlock/issues/1102
diff --git a/src/js/storage.js b/src/js/storage.js
index 3467282088fa7..66203f733d2fb 100644
--- a/src/js/storage.js
+++ b/src/js/storage.js
@@ -196,7 +196,11 @@
});
};
-µBlock.saveSelectedFilterLists = function(newKeys, append) {
+µBlock.saveSelectedFilterLists = function(newKeys, append, callback) {
+ if ( typeof append === 'function' ) {
+ callback = append;
+ append = false;
+ }
var oldKeys = this.selectedFilterLists.slice();
if ( append ) {
newKeys = newKeys.concat(oldKeys);
@@ -214,7 +218,7 @@
remoteBlacklists: this.oldDataFromNewListKeys(newKeys)
};
this.selectedFilterLists = newKeys;
- vAPI.storage.set(bin);
+ vAPI.storage.set(bin, callback);
};
// TODO(seamless migration):
From f321ea31c1b6ab6771bf059cbde2673a9cf0f32a Mon Sep 17 00:00:00 2001
From: gorhill
Date: Fri, 3 Feb 2017 08:13:08 -0500
Subject: [PATCH 42/45] new revision for release candidate
---
platform/chromium/manifest.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json
index 335f79ab51736..9b2af15813fd9 100644
--- a/platform/chromium/manifest.json
+++ b/platform/chromium/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "uBlock Origin",
- "version": "1.10.7.103",
+ "version": "1.10.7.104",
"default_locale": "en",
"description": "__MSG_extShortDesc__",
From 1bceca9cbbddc23e8f02b6f6c81a1cf17939355e Mon Sep 17 00:00:00 2001
From: gorhill
Date: Sun, 5 Feb 2017 07:43:28 -0500
Subject: [PATCH 43/45] fix var name
(https://github.com/el1t/uBlock-Safari/issues/25#issuecomment-277506943))
---
src/js/storage.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/js/storage.js b/src/js/storage.js
index 66203f733d2fb..bfba9d2ea560c 100644
--- a/src/js/storage.js
+++ b/src/js/storage.js
@@ -1121,7 +1121,7 @@
this.loadFilterLists();
}
if ( this.userSettings.autoUpdate ) {
- this.scheduleAssetUpdater(this.hiddenSettings.assetAutoUpdatePeriod * 3600000 || 25200000);
+ this.scheduleAssetUpdater(this.hiddenSettings.autoUpdatePeriod * 3600000 || 25200000);
} else {
this.scheduleAssetUpdater(0);
}
From e4e6d8d8c3dc3daf1481f5f8043926e5a549315f Mon Sep 17 00:00:00 2001
From: gorhill
Date: Sun, 5 Feb 2017 15:25:00 -0500
Subject: [PATCH 44/45] new stable version
---
platform/chromium/manifest.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json
index 9b2af15813fd9..b17c8120e87d7 100644
--- a/platform/chromium/manifest.json
+++ b/platform/chromium/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "uBlock Origin",
- "version": "1.10.7.104",
+ "version": "1.11.0",
"default_locale": "en",
"description": "__MSG_extShortDesc__",
From 2852f9be197ec20387a669df9ce01ef7d6df1c84 Mon Sep 17 00:00:00 2001
From: gorhill
Date: Sun, 5 Feb 2017 15:27:21 -0500
Subject: [PATCH 45/45] translation work from
https://crowdin.com/project/ublock
---
src/_locales/fy/messages.json | 10 +++++-----
src/_locales/it/messages.json | 2 +-
src/_locales/pt_BR/messages.json | 6 +++---
src/_locales/uk/messages.json | 6 +++---
src/_locales/zh_CN/messages.json | 2 +-
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/_locales/fy/messages.json b/src/_locales/fy/messages.json
index 059edde5c7c16..d4cdd3a6bf802 100644
--- a/src/_locales/fy/messages.json
+++ b/src/_locales/fy/messages.json
@@ -40,7 +40,7 @@
"description":"appears as tab name in dashboard"
},
"advancedSettingsPageName":{
- "message":"Advanced settings",
+ "message":"Avansearre ynstellingen",
"description":"Title for the advanced settings page"
},
"popupPowerSwitchInfo":{
@@ -212,7 +212,7 @@
"description":""
},
"settingsAdvancedUserSettings":{
- "message":"advanced settings",
+ "message":"avansearre ynstellingen",
"description":"For the tooltip of a link which gives access to advanced settings"
},
"settingsPrefetchingDisabledPrompt":{
@@ -424,7 +424,7 @@
"description":"English: dynamic rule syntax and full documentation."
},
"whitelistPrompt":{
- "message":"Jo list fan hostnammen wêrop uBlock₀ útskeakele is. Ien per rigel ynjaan. Unjildige hostnammen wurde stil negearre.",
+ "message":"De whitelist-ynstruksjes skriuwe foar op hokker websiden uBlock Origin útskeakele wurde moat. Ien fermelding per rigel. Unjildige ynstruksjes wurde sûnder meidieling negearre en útskeakele.",
"description":"English: An overview of the content of the dashboard's Whitelist pane."
},
"whitelistImport":{
@@ -680,7 +680,7 @@
"description":"used as a prompt for the user to provide a custom device name"
},
"advancedSettingsWarning":{
- "message":"Warning! Change these advanced settings at your own risk.",
+ "message":"Warskôging! Wizigje dizze avansearre ynstellingen op eigen risiko.",
"description":"A warning to users at the top of 'Advanced settings' page"
},
"genericSubmit":{
@@ -688,7 +688,7 @@
"description":"for generic 'Submit' buttons"
},
"genericApplyChanges":{
- "message":"Apply changes",
+ "message":"Wizigingen tapasse",
"description":"for generic 'Apply changes' buttons"
},
"genericRevert":{
diff --git a/src/_locales/it/messages.json b/src/_locales/it/messages.json
index 594851c70ddd8..a8bf2552f51a9 100644
--- a/src/_locales/it/messages.json
+++ b/src/_locales/it/messages.json
@@ -680,7 +680,7 @@
"description":"used as a prompt for the user to provide a custom device name"
},
"advancedSettingsWarning":{
- "message":"Attenzione! Cambia queste impostazioni avanzate a tuo rischio e pericolo.",
+ "message":"Attenzione! Modifica queste impostazioni avanzate a tuo rischio e pericolo.",
"description":"A warning to users at the top of 'Advanced settings' page"
},
"genericSubmit":{
diff --git a/src/_locales/pt_BR/messages.json b/src/_locales/pt_BR/messages.json
index ecdf542ae01a0..42fcae42696b7 100644
--- a/src/_locales/pt_BR/messages.json
+++ b/src/_locales/pt_BR/messages.json
@@ -8,7 +8,7 @@
"description":"this will be in the chrome web store: must be 132 characters or less"
},
"dashboardName":{
- "message":"uBlock₀ — Painel",
+ "message":"uBlock₀ — Painel de controle",
"description":"English: uBlock₀ — Dashboard"
},
"settingsPageName":{
@@ -200,7 +200,7 @@
"description":"English: Make use of context menu where appropriate"
},
"settingsColorBlindPrompt":{
- "message":"Cores amigáveis para daltônicos",
+ "message":"Modo Daltonismo",
"description":"English: Color-blind friendly"
},
"settingsCloudStorageEnabledPrompt":{
@@ -612,7 +612,7 @@
"description":"English: {{value}} days ago"
},
"showDashboardButton":{
- "message":"Mostrar Painel",
+ "message":"Mostrar Painel de Controle",
"description":"Firefox\/Fennec-specific: Show Dashboard"
},
"showNetworkLogButton":{
diff --git a/src/_locales/uk/messages.json b/src/_locales/uk/messages.json
index 5757874f75717..7f0ae5f73f0fb 100644
--- a/src/_locales/uk/messages.json
+++ b/src/_locales/uk/messages.json
@@ -84,7 +84,7 @@
"description":"Tooltip for the no-popups per-site switch"
},
"popupTipNoLargeMedia":{
- "message":"Перемкнути блокування великих медіа елементів на цьому сайті",
+ "message":"Увімк\/Вимк блокування великих медіа елементів на цьому сайті",
"description":"Tooltip for the no-large-media per-site switch"
},
"popupTipNoCosmeticFiltering":{
@@ -292,7 +292,7 @@
"description":"This will cause uBO to ignore all generic cosmetic filters."
},
"3pIgnoreGenericCosmeticFiltersInfo":{
- "message":"Загальні косметичні фільтри — це косметичні фільтри, які повинні застосовуватися до всіх веб-сторінок.
Хоча uBlock і звертається з ними ефективно, вони все одно можуть вимагати значну кількість ресурсів на деяких, особливо великих, сторінках.
Увімкнення цього параметра знизить споживання ресурсів таких сторінок від застосування загальних косметичних фільтрів, а також знизить споживання пам'яті самого uBlock.
Рекомендується увімкнути цей параметр на слабких пристроях.",
+ "message":"
Загальні косметичні фільтри — це косметичні фільтри, які застосовуються до всіх веб-сторінок.
Хоча й uBlock обробує фільтри ефективно, вони все одно можуть вимагати значну кількість ресурсів на деяких, особливо навантаженних сторінках.
Увімкнення цього параметра знизить споживання ресурсів на таких сторінках від застосування загальних косметичних фільтрів, а також знизить споживання пам'яті самого uBlock.
Рекомендується увімкнути цей параметр на слабких пристроях.",
"description":"Describes the purpose of the 'Ignore generic cosmetic filters' feature."
},
"3pListsOfBlockedHostsHeader":{
@@ -424,7 +424,7 @@
"description":"English: dynamic rule syntax and full documentation."
},
"whitelistPrompt":{
- "message":"Список тих доменів, для яких µBlock буде вимикатись. Один запис на рядок. Недопустимі назви будуть ігноруватись.",
+ "message":"Ваш список адрес сайтів, для яких µBlock буде неактивним. Додайте по одному запису на рядок. Невірні адреси будуть проігноровані без зауважень.",
"description":"English: An overview of the content of the dashboard's Whitelist pane."
},
"whitelistImport":{
diff --git a/src/_locales/zh_CN/messages.json b/src/_locales/zh_CN/messages.json
index 1d5fe1c75f8c7..7cd9edb6802fc 100644
--- a/src/_locales/zh_CN/messages.json
+++ b/src/_locales/zh_CN/messages.json
@@ -224,7 +224,7 @@
"description":"English: "
},
"settingsWebRTCIPAddressHiddenPrompt":{
- "message":"防止 WebRTC 泄露本地IP地址",
+ "message":"避免 WebRTC 泄露本地IP地址",
"description":"English: "
},
"settingPerSiteSwitchGroup":{