File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,23 +304,18 @@ var onBeforeRootFrameRequest = function(details) {
304304
305305// https://github.com/gorhill/uBlock/issues/3208
306306// Mind case insensitivity.
307+
307308var toBlockDocResult = function ( url , hostname , logData ) {
308- if ( typeof logData . regex !== 'string' ) { return ; }
309+ if ( typeof logData . regex !== 'string' ) { return false ; }
309310 var re = new RegExp ( logData . regex , 'i' ) ,
310311 match = re . exec ( url . toLowerCase ( ) ) ;
311312 if ( match === null ) { return false ; }
312313
313314 // https://github.com/chrisaljoudi/uBlock/issues/1128
314315 // https://github.com/chrisaljoudi/uBlock/issues/1212
315316 // Relax the rule: verify that the match is completely before the path part
316- if (
317- ( match . index + match [ 0 ] . length ) <=
318- ( url . indexOf ( hostname ) + hostname . length + 1 )
319- ) {
320- return true ;
321- }
322-
323- return false ;
317+ return ( match . index + match [ 0 ] . length ) <=
318+ ( url . indexOf ( hostname ) + hostname . length + 1 ) ;
324319} ;
325320
326321/******************************************************************************/
You can’t perform that action at this time.
0 commit comments