A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gorhill/uBlock/commit/157cef6034a8ec926c1e59c7e77f0a1fcbef473c below:

Re-classify `redirect=` option as a modifier option · gorhill/uBlock@157cef6 · GitHub

File tree Expand file treeCollapse file tree 7 files changed

+140

-389

lines changed

Filter options

Expand file treeCollapse file tree 7 files changed

+140

-389

lines changed Original file line number Diff line number Diff line change

@@ -139,8 +139,8 @@ const µBlock = (( ) => { // jshint ignore:line

139 139 140 140

// Read-only

141 141

systemSettings: {

142 -

compiledMagic: 30, // Increase when compiled format changes

143 -

selfieMagic: 30, // Increase when selfie format changes

142 +

compiledMagic: 31, // Increase when compiled format changes

143 +

selfieMagic: 31, // Increase when selfie format changes

144 144

},

145 145 146 146

// https://github.com/uBlockOrigin/uBlock-issues/issues/759#issuecomment-546654501

Original file line number Diff line number Diff line change

@@ -302,7 +302,13 @@ const processLoggerEntries = function(response) {

302 302

if ( autoDeleteVoidedRows ) { continue; }

303 303

parsed.voided = true;

304 304

}

305 -

if ( parsed.type === 'main_frame' && parsed.aliased === false ) {

305 +

if (

306 +

parsed.type === 'main_frame' &&

307 +

parsed.aliased === false && (

308 +

parsed.filter === undefined ||

309 +

parsed.filter.source !== 'redirect'

310 +

)

311 +

) {

306 312

const separator = createLogSeparator(parsed, unboxed.url);

307 313

loggerEntries.unshift(separator);

308 314

if ( rowFilterer.filterOne(separator) ) {

Original file line number Diff line number Diff line change

@@ -647,22 +647,9 @@ const PageStore = class {

647 647

// Redirect non-blocked request?

648 648

if ( (fctxt.itype & fctxt.INLINE_ANY) === 0 ) {

649 649

if ( result === 1 ) {

650 -

if ( µb.hiddenSettings.ignoreRedirectFilters !== true ) {

651 -

const redirectURL = µb.redirectEngine.toURL(fctxt);

652 -

if ( redirectURL !== undefined ) {

653 -

fctxt.redirectURL = redirectURL;

654 -

this.internalRedirectionCount += 1;

655 -

fctxt.pushFilter({

656 -

source: 'redirect',

657 -

raw: µb.redirectEngine.resourceNameRegister

658 -

});

659 -

}

660 -

}

650 +

this.redirectBlockedRequest(fctxt);

661 651

} else if ( snfe.hasQuery(fctxt) ) {

662 -

const directives = snfe.filterQuery(fctxt);

663 -

if ( directives !== undefined && loggerEnabled ) {

664 -

fctxt.pushFilters(directives.map(a => a.logData()));

665 -

}

652 +

this.redirectNonBlockedRequest(fctxt);

666 653

}

667 654

}

668 655

@@ -675,6 +662,32 @@ const PageStore = class {

675 662

return result;

676 663

}

677 664 665 +

redirectBlockedRequest(fctxt) {

666 +

if ( µb.hiddenSettings.ignoreRedirectFilters === true ) { return; }

667 +

const directive = µb.staticNetFilteringEngine.redirectRequest(fctxt);

668 +

if ( directive === undefined ) { return; }

669 +

this.internalRedirectionCount += 1;

670 +

if ( µb.logger.enabled !== true ) { return; }

671 +

fctxt.pushFilter(directive.logData());

672 +

if ( fctxt.redirectURL === undefined ) { return; }

673 +

fctxt.pushFilter({

674 +

source: 'redirect',

675 +

raw: µb.redirectEngine.resourceNameRegister

676 +

});

677 +

}

678 + 679 +

redirectNonBlockedRequest(fctxt) {

680 +

const directives = µb.staticNetFilteringEngine.filterQuery(fctxt);

681 +

if ( directives === undefined ) { return; }

682 +

if ( µb.logger.enabled !== true ) { return; }

683 +

fctxt.pushFilters(directives.map(a => a.logData()));

684 +

if ( fctxt.redirectURL === undefined ) { return; }

685 +

fctxt.pushFilter({

686 +

source: 'redirect',

687 +

raw: fctxt.redirectURL

688 +

});

689 +

}

690 + 678 691

filterCSPReport(fctxt) {

679 692

if (

680 693

µb.sessionSwitches.evaluateZ(

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4