1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-03 17:49:39 +02:00

code review: element picker

This commit is contained in:
gorhill 2015-03-21 23:54:09 -04:00
parent 58ebcd21c3
commit 4aec3404c4

View File

@ -248,7 +248,7 @@ var netFilterFromUnion = (function() {
var from = lastNetFilterUnion;
// Reset reference filter when dealing with unrelated URLs
if ( from === '' && a.host !== lastNetFilterHostname ) {
if ( from === '' || a.host !== lastNetFilterHostname ) {
lastNetFilterHostname = a.host;
lastNetFilterUnion = to;
localMessager.send({
@ -289,7 +289,7 @@ var netFilterFromUnion = (function() {
}
}
from = fromTokens.join('').replace(/\*\*+/g, '*');
if ( from !== '/*' ) {
if ( from !== '/*' && from !== to ) {
out.push('||' + lastNetFilterHostname + from);
} else {
from = to;