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.10.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
nicole-ashley committed Dec 15, 2016
2 parents 0fd217c + f30b31f commit a91ebbd
Show file tree
Hide file tree
Showing 21 changed files with 175 additions and 171 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ For **support/discussions**, there is [Mozilla Discourse](https://discourse.mozi

For **filter-related issues**, report on the respective filter list support site, or at [uBlockOrigin/uAssets](https://github.com/uBlockOrigin/uAssets/issues). Use [the logger](https://github.com/gorhill/uBlock/wiki/The-logger) to diagnose/confirm filter-related issues. If something does not work properly with uBO enabled, the **first step** is to rule out filter-related issues.

Ignorance of the above rules is no excuse: **Opening an issue for purpose of support or discussion, or opening a filter-related issue will result in the user being immediately blocked.** Given the [amount of invalid issues being opened](https://github.com/gorhill/uBlock/issues?q=is%3Aissue+label%3Ainvalid+is%3Aclosed), I have no choice but to resort to such a drastic measure.
Ignorance of the above rules is no excuse: **Opening an issue for purpose of support or discussion, or opening a filter-related issue will result in the user being immediately blocked.** Given the [amount of invalid issues being opened](https://github.com/gorhill/uBlock/issues?q=is%3Aissue+label%3Ainvalid+is%3Aclosed), I have no choice but to resort to such a drastic measure. You will still be able to open filter list issues at [uBlockOrigin/uAssets](https://github.com/uBlockOrigin/uAssets/issues).

**The issue tracker is for provable issues only:** You will have to make the case that the issue is really with uBlock Origin and not something else on your side. To make a case means to provide detailed steps so that anybody can reproduce the issue. Be sure to rule out that the issue is not caused by something specific on your side.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ You can contribute by helping translate uBlock₀ [on Crowdin](https://crowdin.n

## License

[GPLv3](LICENSE.txt).
[GPLv3](LICENSE.txt).
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.10.0",
"version": "1.10.2",

"default_locale": "en",
"description": "__MSG_extShortDesc__",
Expand Down
76 changes: 34 additions & 42 deletions platform/chromium/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@

// For background page

'use strict';

/******************************************************************************/

(function() {

'use strict';

/******************************************************************************/

var vAPI = self.vAPI = self.vAPI || {};
Expand Down Expand Up @@ -873,28 +873,34 @@ vAPI.net.registerListeners = function() {
is_v49_55 = /\bChrom[a-z]+\/(?:49|5[012345])\b/.test(navigator.userAgent);

// Chromium-based browsers understand only these network request types.
var validTypes = {
'main_frame': true,
'sub_frame': true,
'stylesheet': true,
'script': true,
'image': true,
'object': true,
'xmlhttprequest': true,
'other': true
};
var validTypes = [
'main_frame',
'sub_frame',
'stylesheet',
'script',
'image',
'object',
'xmlhttprequest',
'other'
];

var extToTypeMap = new Map([
['eot','font'],['otf','font'],['svg','font'],['ttf','font'],['woff','font'],['woff2','font'],
['mp3','media'],['mp4','media'],['webm','media'],
['gif','image'],['ico','image'],['jpeg','image'],['jpg','image'],['png','image'],['webp','image']
]);

var denormalizeTypes = function(aa) {
if ( aa.length === 0 ) {
return Object.keys(validTypes);
return validTypes;
}
var out = [];
var i = aa.length,
type,
needOther = true;
while ( i-- ) {
type = aa[i];
if ( validTypes.hasOwnProperty(type) ) {
if ( validTypes.indexOf(type) !== -1 ) {
out.push(type);
}
if ( type === 'other' ) {
Expand Down Expand Up @@ -933,49 +939,35 @@ vAPI.net.registerListeners = function() {
return;
}

var path = µburi.pathFromURI(details.url);
var pos = path.indexOf('.', path.length - 6);

// https://github.com/chrisaljoudi/uBlock/issues/862
// If no transposition possible, transpose to `object` as per
// Chromium bug 410382 (see below)
if ( pos !== -1 ) {
var needle = path.slice(pos) + '.';
if ( '.eot.ttf.otf.svg.woff.woff2.'.indexOf(needle) !== -1 ) {
details.type = 'font';
return;
}

if ( '.mp3.mp4.webm.'.indexOf(needle) !== -1 ) {
details.type = 'media';
return;
}

// Still need this because often behind-the-scene requests are wrongly
// categorized as 'other'
if ( '.ico.png.gif.jpg.jpeg.webp.'.indexOf(needle) !== -1 ) {
details.type = 'image';
return;
}
// Try to map known "extension" part of URL to request type.
var path = µburi.pathFromURI(details.url),
pos = path.indexOf('.', path.length - 6),
type;
if ( pos !== -1 && (type = extToTypeMap.get(path.slice(pos + 1))) ) {
details.type = type;
return;
}

// Try to extract type from response headers if present.
if ( details.responseHeaders ) {
var contentType = headerValue(details.responseHeaders, 'content-type');
if ( contentType.startsWith('font/') ) {
type = headerValue(details.responseHeaders, 'content-type');
if ( type.startsWith('font/') ) {
details.type = 'font';
return;
}
if ( contentType.startsWith('image/') ) {
if ( type.startsWith('image/') ) {
details.type = 'image';
return;
}
if ( contentType.startsWith('audio/') || contentType.startsWith('video/') ) {
if ( type.startsWith('audio/') || type.startsWith('video/') ) {
details.type = 'media';
return;
}
}

// https://github.com/chrisaljoudi/uBlock/issues/862
// If no transposition possible, transpose to `object` as per
// Chromium bug 410382
// https://code.google.com/p/chromium/issues/detail?id=410382
if ( is_v38_48 ) {
details.type = 'object';
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.10.0",
"version": "1.10.2",

"default_locale": "en",
"description": "__MSG_extShortDesc__",
Expand Down
76 changes: 34 additions & 42 deletions platform/edge/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@

// For background page

'use strict';

/******************************************************************************/

(function() {

'use strict';

/******************************************************************************/

var vAPI = self.vAPI = self.vAPI || {};
Expand Down Expand Up @@ -1080,28 +1080,34 @@ vAPI.net.registerListeners = function() {
is_v49_55 = /\bChrom[a-z]+\/(?:49|5[012345])\b/.test(navigator.userAgent);

// Chromium-based browsers understand only these network request types.
var validTypes = {
'main_frame': true,
'sub_frame': true,
'stylesheet': true,
'script': true,
'image': true,
'object': true,
'xmlhttprequest': true,
'other': true
};
var validTypes = [
'main_frame',
'sub_frame',
'stylesheet',
'script',
'image',
'object',
'xmlhttprequest',
'other'
];

var extToTypeMap = new Map([
['eot','font'],['otf','font'],['svg','font'],['ttf','font'],['woff','font'],['woff2','font'],
['mp3','media'],['mp4','media'],['webm','media'],
['gif','image'],['ico','image'],['jpeg','image'],['jpg','image'],['png','image'],['webp','image']
]);

var denormalizeTypes = function(aa) {
if ( aa.length === 0 ) {
return Object.keys(validTypes);
return validTypes;
}
var out = [];
var i = aa.length,
type,
needOther = true;
while ( i-- ) {
type = aa[i];
if ( validTypes.hasOwnProperty(type) ) {
if ( validTypes.indexOf(type) !== -1 ) {
out.push(type);
}
if ( type === 'other' ) {
Expand Down Expand Up @@ -1140,49 +1146,35 @@ vAPI.net.registerListeners = function() {
return;
}

var path = µburi.pathFromURI(details.url);
var pos = path.indexOf('.', path.length - 6);

// https://github.com/chrisaljoudi/uBlock/issues/862
// If no transposition possible, transpose to `object` as per
// Chromium bug 410382 (see below)
if ( pos !== -1 ) {
var needle = path.slice(pos) + '.';
if ( '.eot.ttf.otf.svg.woff.woff2.'.indexOf(needle) !== -1 ) {
details.type = 'font';
return;
}

if ( '.mp3.mp4.webm.'.indexOf(needle) !== -1 ) {
details.type = 'media';
return;
}

// Still need this because often behind-the-scene requests are wrongly
// categorized as 'other'
if ( '.ico.png.gif.jpg.jpeg.webp.'.indexOf(needle) !== -1 ) {
details.type = 'image';
return;
}
// Try to map known "extension" part of URL to request type.
var path = µburi.pathFromURI(details.url),
pos = path.indexOf('.', path.length - 6),
type;
if ( pos !== -1 && (type = extToTypeMap.get(path.slice(pos + 1))) ) {
details.type = type;
return;
}

// Try to extract type from response headers if present.
if ( details.responseHeaders ) {
var contentType = headerValue(details.responseHeaders, 'content-type');
if ( contentType.startsWith('font/') ) {
type = headerValue(details.responseHeaders, 'content-type');
if ( type.startsWith('font/') ) {
details.type = 'font';
return;
}
if ( contentType.startsWith('image/') ) {
if ( type.startsWith('image/') ) {
details.type = 'image';
return;
}
if ( contentType.startsWith('audio/') || contentType.startsWith('video/') ) {
if ( type.startsWith('audio/') || type.startsWith('video/') ) {
details.type = 'media';
return;
}
}

// https://github.com/chrisaljoudi/uBlock/issues/862
// If no transposition possible, transpose to `object` as per
// Chromium bug 410382
// https://code.google.com/p/chromium/issues/detail?id=410382
if ( is_v38_48 ) {
details.type = 'object';
Expand Down
1 change: 1 addition & 0 deletions platform/firefox/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -1900,6 +1900,7 @@ var httpObserver = {
16: 'websocket',
17: 'csp_report',
19: 'beacon',
20: 'xmlhttprequest',
21: 'image'
},
onBeforeRequest: function(){},
Expand Down
2 changes: 1 addition & 1 deletion src/_locales/bg/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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":{
Expand Down
16 changes: 8 additions & 8 deletions src/_locales/el/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"description":"Title for the advanced settings page"
},
"popupPowerSwitchInfo":{
"message":"Κλικ: απενεργοποίηση\/ενεργοποίηση του uBlock για αυτόν τον ιστότοπο.\n\nCtrl+κλικ: απενεργοποίηση του µBlock μόνο για αυτήν την σελίδα.",
"message":"Κλικ: απενεργοποίηση\/ενεργοποίηση του uBlock για αυτόν τον ιστότοπο.\n\nCtrl+κλικ: απενεργοποίηση του uBlock₀ μόνο για αυτήν την σελίδα.",
"description":"English: Click: disable\/enable uBlock₀ for this site.\n\nCtrl+click: disable uBlock₀ only on this page."
},
"popupBlockedRequestPrompt":{
Expand Down Expand Up @@ -100,7 +100,7 @@
"description":"Tooltip when hovering the top-most cell of the global-rules column."
},
"popupTipLocalRules":{
"message":"Τοπικοί κανόνες: αυτή η στήλη είναι για κανόνες με εφαρμογή στην τρέχουσα τοποθεσία μόνον.\nΟι τοπικοί κανόνες παραμερίζουν τους καθολικούς κανόνες.",
"message":"Τοπικοί κανόνες: αυτή η στήλη είναι για κανόνες με εφαρμογή στην τρέχουσα τοποθεσία μόνο.\nΟι τοπικοί κανόνες παραμερίζουν τους καθολικούς κανόνες.",
"description":"Tooltip when hovering the top-most cell of the local-rules column."
},
"popupTipSaveRules":{
Expand All @@ -124,7 +124,7 @@
"description":""
},
"popup3pPassiveRulePrompt":{
"message":"Css\/Εικόνες τρίτου μέρους",
"message":"3ου μέρους css\/Εικόνες",
"description":""
},
"popupInlineScriptRulePrompt":{
Expand Down Expand Up @@ -200,7 +200,7 @@
"description":"English: Make use of context menu where appropriate"
},
"settingsColorBlindPrompt":{
"message":"Λειτουργία φιλική πρως χρήστες με αχρωματοψία",
"message":"Λειτουργία φιλική προς χρήστες με αχρωματοψία",
"description":"English: Color-blind friendly"
},
"settingsCloudStorageEnabledPrompt":{
Expand Down Expand Up @@ -240,7 +240,7 @@
"description":""
},
"settingsNoLargeMediaPrompt":{
"message":"Φραγή στοιχείων πολυμέσων μεγαλύτερων από {{εισαγωγή:αριθμός}} kB",
"message":"Φραγή στοιχείων πολυμέσων μεγαλύτερων από {{input:number}} kB",
"description":""
},
"settingsNoRemoteFontsPrompt":{
Expand Down Expand Up @@ -492,7 +492,7 @@
"description":"Small header to identify the static filtering section"
},
"loggerStaticFilteringSentence":{
"message":"{{action}} το δήκτυο αιτεί {{type}} {{br}} του οποίου η διεύθηνση ταιριάζει {{url}} {{br}} και το οποίο προέρχεται {{origin}},{{br}}{{importance}} υπάρχει ένα ταιριαστό φίλτρο εξαίρεση.",
"message":"{{action}} τα δικτυακά αιτήματα {{type}} {{br}} των οποίων η διεύθυνση ταιριάζει με {{url}} {{br}} και προέρχεται από {{origin}},{{br}}{{importance}} υπάρχει ένα ταιριαστό φίλτρο για εξαίρεση.",
"description":"Used in the static filtering wizard"
},
"loggerStaticFilteringSentencePartBlock":{
Expand Down Expand Up @@ -520,7 +520,7 @@
"description":"Used in the static filtering wizard"
},
"loggerStaticFilteringSentencePartNotImportant":{
"message":"εκτός εάν",
"message":"εκτός όταν",
"description":"Used in the static filtering wizard"
},
"loggerStaticFilteringSentencePartImportant":{
Expand Down Expand Up @@ -676,7 +676,7 @@
"description":""
},
"cloudDeviceNamePrompt":{
"message":"Το όνομα της συσκευής:",
"message":"Το όνομα αυτής της συσκευής:",
"description":"used as a prompt for the user to provide a custom device name"
},
"advancedSettingsWarning":{
Expand Down
2 changes: 1 addition & 1 deletion src/_locales/et/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":"Nimekiri domeenidest, millel uBlock₀ keelatakse. Üks domeen rea kohta, vigaseid domeeninimesid eiratakse.",
"message":"Nimekiri domeenidest, millel uBlock₀ keelatakse. Üks domeen rea kohta, vigased domeeninimed eiratakse vaikimisi ning kommenteeritakse välja.",
"description":"English: An overview of the content of the dashboard's Whitelist pane."
},
"whitelistImport":{
Expand Down
Loading

0 comments on commit a91ebbd

Please sign in to comment.