mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
code review re. #116
This commit is contained in:
parent
b100ff5810
commit
11302c6290
@ -1373,6 +1373,10 @@ FilterContainer.prototype.match3rdPartyHostname = function(requestHostname) {
|
||||
|
||||
// Specialized handlers
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/116
|
||||
// Some type of requests are exceptional, they need custom handling,
|
||||
// not the generic handling.
|
||||
|
||||
FilterContainer.prototype.matchStringExactType = function(pageDetails, requestURL, requestType, requestHostname) {
|
||||
var url = requestURL.toLowerCase();
|
||||
var pageDomain = pageDetails.pageDomain || '';
|
||||
@ -1419,13 +1423,6 @@ FilterContainer.prototype.matchStringExactType = function(pageDetails, requestUR
|
||||
FilterContainer.prototype.matchString = function(pageDetails, requestURL, requestType, requestHostname) {
|
||||
// adbProfiler.countUrl();
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/116
|
||||
// Some type of requests are exceptional, they need custom handling,
|
||||
// not the generic handling.
|
||||
if ( requestType === 'popup' ) {
|
||||
return this.matchStringExactType(pageDetails, requestURL, requestType, requestHostname);
|
||||
}
|
||||
|
||||
// https://github.com/gorhill/httpswitchboard/issues/239
|
||||
// Convert url to lower case:
|
||||
// `match-case` option not supported, but then, I saw only one
|
||||
|
@ -152,7 +152,7 @@ var onBeforeSendHeaders = function(details) {
|
||||
// in multiple tabs.
|
||||
var reason = false;
|
||||
if ( µb.getNetFilteringSwitch(pageStore.pageHostname) ) {
|
||||
reason = µb.abpFilters.matchString(
|
||||
reason = µb.abpFilters.matchStringExactType(
|
||||
pageDetails,
|
||||
requestURL,
|
||||
'popup',
|
||||
|
Loading…
Reference in New Issue
Block a user