Skip to content

Commit

Permalink
Merge pull request gorhill#7 from gorhill/master
Browse files Browse the repository at this point in the history
Re-sync with uBo master
  • Loading branch information
pes10k committed May 9, 2020
2 parents fd28693 + 6ba38f3 commit 84e58f1
Show file tree
Hide file tree
Showing 96 changed files with 1,543 additions and 809 deletions.
40 changes: 31 additions & 9 deletions assets/resources/scriptlets.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
apply: function(target, thisArg, args) {
const type = args[0].toString();
const handler = String(args[1]);
log('addEventListener("%s", %s)', type, handler);
log('uBO: addEventListener("%s", %s)', type, handler);
return target.apply(thisArg, args);
}
}
Expand All @@ -249,16 +249,35 @@


/// json-prune.js
//
// When no "prune paths" argument is provided, the scriptlet is
// used for logging purpose and the "needle paths" argument is
// used to filter logging output.
(function() {
const log = console.log.bind(console);
const rawPrunePaths = '{{1}}';
const rawNeedlePaths = '{{2}}';
const prunePaths = rawPrunePaths !== '{{1}}' && rawPrunePaths !== ''
? rawPrunePaths.split(/ +/)
: [];
const needlePaths = rawNeedlePaths !== '{{2}}' && rawNeedlePaths !== ''
? rawNeedlePaths.split(/ +/)
: [];
let needlePaths;
let log, reLogNeedle;
if ( prunePaths.length !== 0 ) {
needlePaths = prunePaths.length !== 0 &&
rawNeedlePaths !== '{{2}}' && rawNeedlePaths !== ''
? rawNeedlePaths.split(/ +/)
: [];
} else {
log = console.log.bind(console);
let needle;
if ( rawNeedlePaths === '' || rawNeedlePaths === '{{2}}' ) {
needle = '.?';
} else if ( rawNeedlePaths.charAt(0) === '/' && rawNeedlePaths.slice(-1) === '/' ) {
needle = rawNeedlePaths.slice(1, -1);
} else {
needle = rawNeedlePaths.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
reLogNeedle = new RegExp(needle);
}
const findOwner = function(root, path) {
let owner = root;
let chain = path;
Expand Down Expand Up @@ -286,8 +305,11 @@
JSON.parse = new Proxy(JSON.parse, {
apply: function() {
const r = Reflect.apply(...arguments);
if ( prunePaths.length === 0 ) {
log(location.hostname, r);
if ( log !== undefined ) {
const json = JSON.stringify(r, null, 2);
if ( reLogNeedle.test(json) ) {
log('uBO:', location.hostname, json);
}
return r;
}
if ( mustProcess(r) === false ) { return r; }
Expand Down Expand Up @@ -829,7 +851,7 @@
new Proxy(peerConnectionProto.createDataChannel, {
apply: function(target, thisArg, args) {
if ( isGoodConfig(target, args[1]) === false ) {
log(args[1]);
log('uBO:', args[1]);
return Reflect.apply(target, thisArg, args.slice(0, 1));
}
return Reflect.apply(target, thisArg, args);
Expand All @@ -839,7 +861,7 @@
new Proxy(peerConnectionCtor, {
construct: function(target, args) {
if ( isGoodConfig(target, args[0]) === false ) {
log(args[0]);
log('uBO:', args[0]);
return Reflect.construct(target);
}
return Reflect.construct(target, args);
Expand Down
40 changes: 20 additions & 20 deletions dist/description/description-hi.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
एक कुशल अवरोधक: स्मृति और सीपीयू पदचिह्न पर आसान है, और अभी तक लोड और हजारों लागू वहाँ से बाहर अन्य लोकप्रिय ब्लॉकर्स और अधिक से अधिक फिल्टर कर सकते हैं
एक बेहतर ब्लॉकर : एक बेहतर ब्लॉक कर जो मेमोरी और सीपीयू पर ज्यादा जोर नहीं देता, और जो हजारों फिल्टरों को आसानी से लोड करके और लागू कर सकता है दूसरे लोकप्रिय ब्लॉकरों से

अपनी क्षमता का सचित्र अवलोकन: https://github.com/gorhill/uBlock/wiki/uBlock-vs.-ABP:-efficiency-compared
अपनी काबिलियत का ओवरव्यू: https://github.com/gorhill/uBlock/wiki/uBlock-vs.-ABP:-efficiency-compared

उपयोग: पॉपअप में बड़ी शक्ति बटन स्थायी रूप से अक्षम / वर्तमान वेब साइट uBlock लिए सक्षम है। यह केवल मौजूदा वेब साइट पर लागू होता है, यह एक वैश्विक शक्ति बटन नहीं है।
इस्तेमाल: बड़ा पावर बटन पॉपअप uBlock को मौजूदा वेबसाइट में बंद या चालू करने के लिए है। यह सिर्फ मौजूदा वेब साइट पर लागू होता है, यह एक ग्लोबल पावर बटन नहीं है।

***

लचीले, यह एक केवल "विज्ञापन अवरोधक" की तुलना से अधिक है: यह भी पढ़ सकता हैं और मेजबान फाइलों से फिल्टर बना सकते हैं
लचीला, यह एक "एडब्लॉकर" से ज्यादा है: यह होस्ट फाइलों को और फिल्टरों को पढ़ और बना सकता है

Out of the box, these lists of filters are loaded and enforced:
इंस्टॉल करते ही इन फिल्टरों को लोड और लागू किया जाएगा:

- आसान सूची
- Peter Lowe's विज्ञापन सर्वर सूची
- आसान गुप्तता
- मैलवेयर डोमेन
- EasyList
- Peter Lowe's एड सर्वर सूची
- EasyPrivacy
- Malware domains

यदि आप चाहें तो आप का चयन करने के लिए और अधिक सूची उपलब्ध हैं
अगर आप चाहें तो चुनने के लिए और भी सूचियाँ उपलब्ध हैं:

- Fanboy's बढ़ी ट्रैकिंग सूची
- Dan Pollock's मेजबान फ़ाइल
- hpHosts's विज्ञापन और ट्रैकिंग सर्वर
- MVPS मेज़बान
-स्पैम404
- Fanboy कि बढ़ी ट्रैकिंग सूची
- Dan Pollock कि होस्ट फाइल
- hpHosts कि एड और ट्रैकिंग सर्वरस
- MVPS हॉस्ट्स
- Spam404
- और बहुत सारे

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.
बेशक, ज्यादा फिल्टर्स मतलब ज्यादा मेमोरी फुटप्रिंट। फिर भी, Fanboy की दो और सूचियों, hpHosts के विज्ञापन और ट्रैकिंग सर्वरों को जोड़ने के बाद, uBlock में अभी भी दूसरे लोकप्रिय ब्लॉकर्स की तुलना में कम मेमोरी फ़ुटप्रिंट है।

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.
बिना प्रीसेट फिल्टर सूचियों के, यह एक्सटेंशन कुछ भी नहीं है। इसलिए अगर आप कभी सचमुच में कुछ योगदान करना चाहते हैं, तो उन लोगों के बारे में सोचें जो आपके द्वारा इस्तेमाल की जा रही फ़िल्टर सूचियों को बनाए रखने के लिए कड़ी मेहनत कर रहे हैं, जिन्हें मुफ्त में सभी को इस्तेमाल करने के लिए उपलब्ध कराया गया है।

***

नि: शुल्क।
Open source with public license (GPLv3)
ओपन-सोर्स पब्लिक लाइसेंस के साथ (GPLv3)
उपयोगकर्ताओं द्वारा उपयोगकर्ताओं के लिए।

योगदानकर्ताओं @ Github: https://github.com/gorhill/uBlock/graphs/contributors
Expand All @@ -45,5 +45,5 @@ Open source with public license (GPLv3)

It's quite an early version, keep this in mind when you review.

Project change log:
प्रोजेक्ट परिवर्तन लॉग:
https://github.com/gorhill/uBlock/releases
6 changes: 3 additions & 3 deletions dist/firefox/updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"uBlock0@raymondhill.net": {
"updates": [
{
"version": "1.26.3.11",
"version": "1.26.3.106",
"browser_specific_settings": { "gecko": { "strict_min_version": "55" } },
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/1.26.3b11",
"update_link": "https://github.com/gorhill/uBlock/releases/download/1.26.3b11/uBlock0_1.26.3b11.firefox.signed.xpi"
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/1.26.3rc6",
"update_link": "https://github.com/gorhill/uBlock/releases/download/1.26.3rc6/uBlock0_1.26.3rc6.firefox.signed.xpi"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion dist/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.26.3.11
1.26.3.106
5 changes: 4 additions & 1 deletion platform/chromium/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"32": "img/icon_32.png"
},
"default_title": "uBlock Origin",
"default_popup": "popup.html"
"default_popup": "popup-fenix.html"
},
"commands": {
"launch-element-zapper": {
Expand All @@ -21,6 +21,9 @@
"launch-logger": {
"description": "__MSG_popupTipLog__"
},
"open-dashboard": {
"description": "__MSG_popupTipDashboard__"
},
"relax-blocking-mode": {
"description": "__MSG_relaxBlockingMode__"
}
Expand Down
5 changes: 4 additions & 1 deletion platform/firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"32": "img/icon_32.png"
},
"default_title": "uBlock Origin",
"default_popup": "popup.html"
"default_popup": "popup-fenix.html"
},
"browser_specific_settings": {
"gecko": {
Expand All @@ -30,6 +30,9 @@
"launch-logger": {
"description": "__MSG_popupTipLog__"
},
"open-dashboard": {
"description": "__MSG_popupTipDashboard__"
},
"relax-blocking-mode": {
"description": "__MSG_relaxBlockingMode__"
}
Expand Down
5 changes: 4 additions & 1 deletion platform/opera/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"16": "img/icon_16.png",
"32": "img/icon_32.png"
},
"default_popup": "popup.html",
"default_popup": "popup-fenix.html",
"default_title": "uBlock Origin"
},
"commands": {
Expand All @@ -21,6 +21,9 @@
"launch-logger": {
"description": "__MSG_popupTipLog__"
},
"open-dashboard": {
"description": "__MSG_popupTipDashboard__"
},
"relax-blocking-mode": {
"description": "__MSG_relaxBlockingMode__"
}
Expand Down
4 changes: 2 additions & 2 deletions src/3p-filters.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="body">

<div id="cloudWidget" class="hide" data-cloud-entry="tpFiltersPane"></div>
<div id="actions" class="root">
<div id="actions">
<button id="buttonApply" class="important disabled iconifiable" type="button" data-i18n-title="3pApplyChanges"><span class="fa-icon">check</span><span data-i18n="3pApplyChanges"></span></button>
<button id="buttonUpdate" class="important disabled iconifiable" type="button" data-i18n-title="3pUpdateNow"><span class="fa-icon">refresh</span><span data-i18n="3pUpdateNow"></span></button>
<button id="buttonPurgeAll" class="disabled iconifiable" type="button" data-i18n-title="3pPurgeAll"><span class="fa-icon">clock-o</span><span data-i18n="3pPurgeAll"></span></button>
Expand All @@ -31,7 +31,7 @@
</div>
</div>

<div class="root">
<div>
<div><span id="listsOfBlockedHostsPrompt"></span>
<div id="lists"></div>
</div>
Expand Down
10 changes: 9 additions & 1 deletion src/_locales/ar/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@
},
"popupMoreButton_v2": {
"message": "المزيد",
"description": "Label to be used to toggle overview panel"
"description": "Label to be used to show popup panel sections"
},
"popupLessButton_v2": {
"message": "Less",
"description": "Label to be used to hide popup panel sections"
},
"popupTipGlobalRules": {
"message": "القواعد العامة: هذا العمود يتعلق بالقواعد التي تنطبق على جميع الموقع.",
Expand Down Expand Up @@ -259,6 +263,10 @@
"message": "{{count}} من {{total}}",
"description": "appears in popup"
},
"popupVersion": {
"message": "Version",
"description": "Example of use: Version 1.26.4"
},
"pickerCreate": {
"message": "إنشاء",
"description": "English: Create"
Expand Down
Loading

0 comments on commit 84e58f1

Please sign in to comment.