Skip to content
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.

Commit

Permalink
Merge tag '1.11.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
nicole-ashley committed Mar 5, 2017
2 parents 2ab2779 + b77cfc3 commit cf0a9cc
Show file tree
Hide file tree
Showing 23 changed files with 259 additions and 243 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ While most of the code in this extension is shared with [upstream](https://githu

## Issues

Known issues, bugs and missing features are listed on the [Issues page](https://github.com/nikrolls/uBlock-Edge/issues) for this repo. Features documented in the upstream extension and not listed on the Issues page are assumed to be working. If you run into an issue not listed, please [create a new issue](https://github.com/nikrolls/uBlock-Edge/issues) and complete the provided template.
In the first instance, issues should be reported in [uBlock’s section of the Feedback Hub](feedback-hub://?tabid=2&appid=37833NikRolls.uBlockOrigin_f8jsg5mm64m62!App). If this is not working for you, please [create a new GitHub issue](https://github.com/nikrolls/uBlock-Edge/issues) and complete the provided template.

## Performance and Efficiency

Expand Down
6 changes: 3 additions & 3 deletions dist/description/description-da.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
En effektiv blocker: let på hukommelse og CPU forbrug,. Kan indlæse og anvende tusindvis af flere filtre end andre populære blockere derude.

Illustreret oversigt over effektiviteten: https://github.com/gorhill/uBlock/wiki/uBlock-vs.-ABP :-Efficiency-compared
Illustreret oversigt over effektiviteten: https://github.com/gorhill/uBlock/wiki/uBlock-vs.-ABP:-Efficiency-compared

Anvendelse: Den Store power knap i pop-up-vinduet kan permanent deaktivere/aktivere uBlock på det aktuelle websted. Dette gælder kun for det aktuelle websted, det er ikke en global afbryderknap.
Anvendelse: Den store tænd-sluk-knap i pop op-vinduet bruges til permanent at deaktivere/aktivere uBlock på det aktuelle websted. Dette gælder kun for det aktuelle websted, det er ikke en global afbryderknap.

***

Expand All @@ -24,7 +24,7 @@ Flere lister er tilgængelige hvis du ønsker det:
- Spam404
- Osv.

Selvfølgelig vil flere aktive filtre betyde højere hukommelsesforbrug. Selv efter tilføjelse af Fanboys to ekstra lister, og hpHosts’s Ad and tracking servers, har uBlock stadig et lavere hukommelsesforbrug end andre blokere derude.
Selvfølgelig vil flere aktive filtre betyde højere hukommelsesforbrug. Men selv efter tilføjelse af Fanboys to ekstra lister, samt hpHosts’s Ad and tracking servers, har uBlock stadig et lavere hukommelsesforbrug end andre meget populære blockere derude.

Vær desuden opmærksom på, at hvis du vælger nogle af disse ekstra lister kan det føre til højere sandsynlighed for, at webstedet bliver vist forkert - især de lister der normalt anvendes som hosts-fil.

Expand Down
2 changes: 1 addition & 1 deletion platform/chromium/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,

"name": "uBlock Origin",
"version": "1.11.0",
"version": "1.11.2",

"default_locale": "en",
"description": "__MSG_extShortDesc__",
Expand Down
25 changes: 15 additions & 10 deletions platform/chromium/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -976,16 +976,23 @@ vAPI.net.registerListeners = function() {
// logger, etc.
// Counterpart of following block of code is found in "vapi-client.js" --
// search for "https://github.com/gorhill/uBlock/issues/1497".
//
// Once uBO 1.11.1 and uBO-Extra 2.12 are widespread, the image-based
// handling code can be removed.
var onBeforeWebsocketRequest = function(details) {
if ( (details.type !== 'image') &&
(details.method !== 'HEAD' || details.type !== 'xmlhttprequest')
) {
return;
}
var requestURL = details.url,
matches = /[?&]u(?:rl)?=([^&]+)/.exec(requestURL);
if ( matches === null ) { return; }
details.type = 'websocket';
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; }
// Try to redirect to the URL of an image already present in the
// document, or a 1x1 data: URL if none is present.
// Redirect to the provided URL, or a 1x1 data: URI if none provided.
matches = /[?&]r=([^&]+)/.exec(requestURL);
return {
redirectUrl: matches !== null ?
Expand All @@ -997,11 +1004,9 @@ vAPI.net.registerListeners = function() {
var onBeforeRequestClient = this.onBeforeRequest.callback;
var onBeforeRequest = function(details) {
// https://github.com/gorhill/uBlock/issues/1497
if (
details.type === 'image' &&
details.url.endsWith('ubofix=f41665f3028c7fd10eecf573336216d3')
) {
return onBeforeWebsocketRequest(details);
if ( details.url.endsWith('ubofix=f41665f3028c7fd10eecf573336216d3') ) {
var r = onBeforeWebsocketRequest(details);
if ( r !== undefined ) { return r; }
}

normalizeRequestDetails(details);
Expand Down
1 change: 1 addition & 0 deletions platform/edge/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<p id="aboutNameVer"></p>
<ul>
<li><a href="https://github.com/nikrolls/uBlock-Edge/releases" data-i18n="aboutChangelog"></a>
<li><a href="feedback-hub://?tabid=2&appid=37833NikRolls.uBlockOrigin_f8jsg5mm64m62!App" data-i18n="aboutSupport"></a>
<li><a href="https://github.com/nikrolls/uBlock-Edge" data-i18n="aboutCode"></a>
<li><span data-i18n="aboutContributors"></span>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion platform/edge/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,

"name": "uBlock Origin",
"version": "1.11.0",
"version": "1.11.2",

"default_locale": "en",
"description": "__MSG_extShortDesc__",
Expand Down
27 changes: 15 additions & 12 deletions platform/edge/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -1178,22 +1178,27 @@ vAPI.net.registerListeners = function() {
}
};

// https://bugs.chromium.org/p/chromium/issues/detail?id=129353
// https://github.com/gorhill/uBlock/issues/1497
// Expose websocket-based network requests to uBO's filtering engine,
// logger, etc.
// Counterpart of following block of code is found in "vapi-client.js" --
// search for "https://github.com/gorhill/uBlock/issues/1497".
//
// Once uBO 1.11.1 and uBO-Extra 2.12 are widespread, the image-based
// handling code can be removed.
var onBeforeWebsocketRequest = function(details) {
if ( (details.type !== 'image') &&
(details.method !== 'HEAD' || details.type !== 'xmlhttprequest')
) {
return;
}
var requestURL = details.url,
matches = /[?&]u(?:rl)?=([^&]+)/.exec(requestURL);
if ( matches === null ) { return; }
details.type = 'websocket';
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; }
// Try to redirect to the URL of an image already present in the
// document, or a 1x1 data: URL if none is present.
// Redirect to the provided URL, or a 1x1 data: URI if none provided.
matches = /[?&]r=([^&]+)/.exec(requestURL);
return {
redirectUrl: matches !== null ?
Expand All @@ -1205,11 +1210,9 @@ vAPI.net.registerListeners = function() {
var onBeforeRequestClient = this.onBeforeRequest.callback;
var onBeforeRequest = function(details) {
// https://github.com/gorhill/uBlock/issues/1497
if (
details.type === 'image' &&
details.url.endsWith('ubofix=f41665f3028c7fd10eecf573336216d3')
) {
return onBeforeWebsocketRequest(details);
if ( details.url.endsWith('ubofix=f41665f3028c7fd10eecf573336216d3') ) {
var r = onBeforeWebsocketRequest(details);
if ( r !== undefined ) { return r; }
}

normalizeRequestDetails(details);
Expand Down
4 changes: 2 additions & 2 deletions platform/firefox/install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<r:Description>
<id>{{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}}</id>
<minVersion>2.21</minVersion>
<maxVersion>2.40.*</maxVersion>
<maxVersion>*</maxVersion>
</r:Description>
</targetApplication>

Expand All @@ -48,7 +48,7 @@
<r:Description>
<id>{{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}}</id>
<minVersion>25.0</minVersion>
<maxVersion>26.*</maxVersion>
<maxVersion>27.*</maxVersion>
</r:Description>
</targetApplication>

Expand Down
1 change: 1 addition & 0 deletions platform/webext/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
},
"permissions": [
"contextMenus",
"privacy",
"storage",
"tabs",
"webNavigation",
Expand Down
2 changes: 1 addition & 1 deletion src/_locales/ar/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
"description":""
},
"settingsAdvancedUserPrompt":{
"message":"أنا مستخدم متقدم (<a href='https:\/\/github.com\/gorhill\/uBlock\/wiki\/Advanced-user-features'>قراءة إجبارية<\/a>)",
"message":"أنا مستخدم ذو خبرة (<a href='https:\/\/github.com\/gorhill\/uBlock\/wiki\/Advanced-user-features'>قراءة إجبارية<\/a>)",
"description":""
},
"settingsAdvancedUserSettings":{
Expand Down
6 changes: 3 additions & 3 deletions src/_locales/da/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,23 +224,23 @@
"description":"English: "
},
"settingsWebRTCIPAddressHiddenPrompt":{
"message":"Forhindre WebRTC i at lække lokale IP-adresser",
"message":"Forhindr WebRTC i at lække lokale IP-adresser",
"description":"English: "
},
"settingPerSiteSwitchGroup":{
"message":"Standard opførsel",
"description":""
},
"settingPerSiteSwitchGroupSynopsis":{
"message":"Disse standardindstillinger kan overskrives på en per-side basis",
"message":"Disse standardindstillinger kan tilsidesættes for hver enkelt websted",
"description":""
},
"settingsNoCosmeticFilteringPrompt":{
"message":"Deaktiver kosmetisk filtrering",
"description":""
},
"settingsNoLargeMediaPrompt":{
"message":"Bloker medieelementer større end {{input: nummer}} kB",
"message":"Bloker medieelementer større end {{input:number}} kB",
"description":""
},
"settingsNoRemoteFontsPrompt":{
Expand Down
4 changes: 2 additions & 2 deletions src/_locales/eo/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"description":"appears as tab name in dashboard"
},
"advancedSettingsPageName":{
"message":"Advanced settings",
"message":"Altgradaj agordoj",
"description":"Title for the advanced settings page"
},
"popupPowerSwitchInfo":{
Expand Down Expand Up @@ -212,7 +212,7 @@
"description":""
},
"settingsAdvancedUserSettings":{
"message":"advanced settings",
"message":"altgradaj agordoj",
"description":"For the tooltip of a link which gives access to advanced settings"
},
"settingsPrefetchingDisabledPrompt":{
Expand Down
2 changes: 1 addition & 1 deletion src/_locales/he/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
"description":"English: dynamic rule syntax and full documentation."
},
"whitelistPrompt":{
"message":"רשימת שמות המתחם שלך בהם uBlockלא יהיה פעיל. רשומה אחת בכל שורה. שמות מתחם לא חוקיים לא יפורשו ולא תהיה התראה לכך.",
"message":"הרשומות ברשימה הלבנה מציינות באילו דפי אינטרנט uBlock Origin לא יהיה פעיל. רשומה אחת בכל שורה. רשומות לא חוקיות תתעלמנה בשקט ויסומנו כהערות.",
"description":"English: An overview of the content of the dashboard's Whitelist pane."
},
"whitelistImport":{
Expand Down
2 changes: 1 addition & 1 deletion src/_locales/pt_BR/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"description":"English: Make use of context menu where appropriate"
},
"settingsColorBlindPrompt":{
"message":"Modo Daltonismo",
"message":"Modo daltonismo",
"description":"English: Color-blind friendly"
},
"settingsCloudStorageEnabledPrompt":{
Expand Down
4 changes: 2 additions & 2 deletions src/_locales/pt_PT/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,15 +560,15 @@
"description":"English: my-ublock-backup_{{datetime}}.txt"
},
"aboutRestoreDataButton":{
"message":"Restaurar por um ficheiro...",
"message":"Restaurar a partir de um ficheiro...",
"description":"English: Restore from file..."
},
"aboutResetDataButton":{
"message":"Restaurar predefinições...",
"description":"English: Reset to default settings..."
},
"aboutRestoreDataConfirm":{
"message":"Todas as suas definições serão substituídas utilizando os dados da cópia de segurança de {{time}}, e uBlock₀ irá reiniciar.\n\nSubstituir todas as definições existentes utilizando os dados da cópia de segurança?",
"message":"Todas as suas definições serão substituídas utilizando os dados da cópia de segurança de {{time}}, e o uBlock₀ irá reiniciar.\n\nSubstituir todas as definições existentes utilizando os dados da cópia de segurança?",
"description":"Message asking user to confirm restore"
},
"aboutRestoreDataError":{
Expand Down
2 changes: 1 addition & 1 deletion src/_locales/sv/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"description":"English: Enter element picker mode"
},
"popupTipLog":{
"message":"Öppna loggaren",
"message":"Öppna loggen",
"description":"Tooltip used for the logger icon in the panel"
},
"popupTipNoPopups":{
Expand Down
6 changes: 3 additions & 3 deletions src/epicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@
resize: none;
width: 100%;
}
section > div:first-child > textarea + div {
#resultsetCount {
background-color: #aaa;
bottom: 0;
color: white;
padding: 2px 4px;
position: absolute;
right: 0;
}
section.invalidFilter > div:first-child > textarea + div {
section.invalidFilter #resultsetCount {
background-color: red;
}
section > div:first-child + div {
Expand Down Expand Up @@ -183,7 +183,7 @@
<section>
<div>
<textarea lang="en" dir="ltr" spellcheck="false"></textarea>
<div></div>
<div id="resultsetCount"></div>
</div>
<div><!--
--><button id="preview" type="button">{{preview}}</button><!--
Expand Down
36 changes: 24 additions & 12 deletions src/js/contentscript.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*******************************************************************************
uBlock Origin - a browser extension to block requests.
Copyright (C) 2014-2016 Raymond Hill
Copyright (C) 2014-2017 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
Expand Down Expand Up @@ -1533,36 +1533,48 @@ vAPI.domSurveyor = (function() {

var surveyPhase1 = function(addedNodes) {
var t0 = window.performance.now(),
nodes = selectNodes('[class],[id]', addedNodes),
rews = reWhitespace,
qq = queriedSelectors,
ll = lowGenericSelectors,
node, v, vv, j,
i = nodes.length;
lli = ll.length,
nodes, i, node, v, vv, j;
nodes = selectNodes('[id]', addedNodes);
i = nodes.length;
while ( i-- ) {
node = nodes[i];
if ( node.nodeType !== 1 ) { continue; }
v = node.id;
if ( v !== '' && typeof v === 'string' ) {
v = '#' + v.trim();
if ( v !== '#' && !qq.has(v) ) { ll.push(v); qq.add(v); }
if ( typeof v !== 'string' ) { continue; }
v = '#' + v.trim();
if ( !qq.has(v) && v.length !== 1 ) {
ll[lli] = v; lli++; qq.add(v);
}
}
nodes = selectNodes('[class]', addedNodes);
i = nodes.length;
while ( i-- ) {
node = nodes[i];
vv = node.className;
if ( vv === '' || typeof vv !== 'string' ) { continue; }
if ( /\s/.test(vv) === false ) {
if ( typeof vv !== 'string' ) { continue; }
if ( !rews.test(vv) ) {
v = '.' + vv;
if ( !qq.has(v) ) { ll.push(v); qq.add(v); }
if ( !qq.has(v) && v.length !== 1 ) {
ll[lli] = v; lli++; qq.add(v);
}
} else {
vv = node.classList;
j = vv.length;
while ( j-- ) {
v = '.' + vv[j];
if ( !qq.has(v) ) { ll.push(v); qq.add(v); }
if ( !qq.has(v) ) {
ll[lli] = v; lli++; qq.add(v);
}
}
}
}
surveyCost += window.performance.now() - t0;
surveyPhase2(addedNodes);
};
var reWhitespace = /\s/;

var domChangedHandler = function(addedNodes) {
if ( cosmeticSurveyingMissCount > 255 ) {
Expand Down
4 changes: 4 additions & 0 deletions src/js/messaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,10 @@ var onMessage = function(request, sender, callback) {
case 'purgeCache':
µb.assets.purge(request.assetKey);
µb.assets.remove('compiled/' + request.assetKey);
// https://github.com/gorhill/uBlock/pull/2314#issuecomment-278716960
if ( request.assetKey === 'ublock-filters' ) {
µb.assets.purge('ublock-resources');
}
break;

case 'readHiddenSettings':
Expand Down

0 comments on commit cf0a9cc

Please sign in to comment.