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

Commit

Permalink
code review re. #116
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Jul 30, 2014
1 parent b100ff5 commit 11302c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions js/abp-filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '';
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion js/traffic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 11302c6

Please sign in to comment.