Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit 5dc7786

Browse files
committed
Merge branch 'v0.9.5.3'
* v0.9.5.3: 1. Special handling is given to filters which had to match against document origin only. The filter will only be considered if it satisfies the given criteria. - Should be in the form of `/czf*.` (without token) or `|https://` or `|http://` or `*` - Should have `domain=` option - Should not have a negated domain in its `domain=` option - Should not have `csp=` option examples: |http://$image,script,subdocument,third-party,xmlhttprequest,domain=dwindly.io |https://$image,other,script,stylesheet,third-party,domain=movies123.xyz $websocket,domain=povw1deo.com|povwideo.net|powvideo.net /czf*.$image,domain=100percentfedup.com
2 parents 90ac9d5 + 847bab7 commit 5dc7786

File tree

7 files changed

+360
-368
lines changed

7 files changed

+360
-368
lines changed

platform/chromium/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33

44
"name": "uBlock",
5-
"version": "0.9.5.15",
5+
"version": "0.9.5.16",
66

77
"default_locale": "en",
88
"description": "__MSG_extShortDesc__",

src/js/background.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ return {
9191

9292
// read-only
9393
systemSettings: {
94-
compiledMagic: 'eopszukpsddd',
95-
selfieMagic: 'menhiasrsddd'
94+
compiledMagic: 'krpszukpsddd',
95+
selfieMagic: 'ednhiasrsddd'
9696
},
9797
restoreBackupSettings: {
9898
lastRestoreFile: '',

src/js/messaging.js

+1
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ var filterRequests = function(pageStore, details) {
477477
request = requests[i];
478478
context.requestURL = vAPI.punycodeURL(request.url);
479479
context.requestHostname = µburi.hostnameFromURI(request.url);
480+
context.requestDomain = µburi.domainFromHostname(context.requestHostname);
480481
context.requestType = tagNameToRequestTypeMap[request.tagName];
481482
if ( isBlockResult(pageStore.filterRequest(context)) ) {
482483
request.collapse = true;

src/js/pagestore.js

+5
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ FrameStore.prototype.init = function(rootHostname, frameURL) {
251251
this.pageURL = frameURL;
252252
this.pageHostname = µburi.hostnameFromURI(frameURL);
253253
this.pageDomain = µburi.domainFromHostname(this.pageHostname) || this.pageHostname;
254+
this.pageHostnameHashes = µb.getHostnameHashesFromLabelsBackward(this.pageHostname, this.pageDomain, false);
254255
return this;
255256
};
256257

@@ -440,6 +441,7 @@ PageStore.prototype.createContextFromPage = function() {
440441
var context = new µb.tabContextManager.createContext(this.tabId);
441442
context.pageHostname = context.rootHostname;
442443
context.pageDomain = context.rootDomain;
444+
context.pageHostnameHashes = context.rootHostnameHashes;
443445
return context;
444446
};
445447

@@ -449,9 +451,11 @@ PageStore.prototype.createContextFromFrameId = function(frameId) {
449451
var frameStore = this.frames[frameId];
450452
context.pageHostname = frameStore.pageHostname;
451453
context.pageDomain = frameStore.pageDomain;
454+
context.pageHostnameHashes = frameStore.pageHostnameHashes;
452455
} else {
453456
context.pageHostname = context.rootHostname;
454457
context.pageDomain = context.rootDomain;
458+
context.pageHostnameHashes = context.rootHostnameHashes;
455459
}
456460
return context;
457461
};
@@ -460,6 +464,7 @@ PageStore.prototype.createContextFromFrameHostname = function(frameHostname) {
460464
var context = new µb.tabContextManager.createContext(this.tabId);
461465
context.pageHostname = frameHostname;
462466
context.pageDomain = µb.URI.domainFromHostname(frameHostname) || frameHostname;
467+
context.pageHostnameHashes = µb.getHostnameHashesFromLabelsBackward(context.pageHostname, context.pageDomain, false);
463468
return context;
464469
};
465470

0 commit comments

Comments
 (0)