Skip to content

Loading…

Fanboy Annoyance's `||platform.twitter.com*/widgets/$third-party` not working #48

Closed
gorhill opened this Issue · 2 comments

1 participant

@gorhill

It's because:

FilterSingleWildcardPrefix0.prototype.match = function(url, tokenBeg) {
    return url.substr(tokenBeg, this.lSegment.length) === this.lSegment &&
           url.indexOf(this.rSegment, tokenBeg + this.lSegment.length) > 0;
};

Should be:

FilterSingleWildcardPrefix0.prototype.match = function(url, tokenBeg) {
    return url.substr(tokenBeg, this.lSegment.length) === this.lSegment &&
           url.indexOf(this.rSegment, tokenBeg + this.lSegment.length) >= 0;
};

EDIT: never mind, code above is good, the right-hand segment will never be at offset 0.

@gorhill

Duh never mind, http://platform.twitter.com/widgets.js is not supposed to match ||platform.twitter.com*/widgets/$third-party. False alarm.

@gorhill gorhill closed this
@gorhill

So the question is, why is http://platform.twitter.com/widgets.js not filtered by Fanboy Annoyance?

Looks like the version on Fanboy server has the filter:

||platform.twitter.com*/widget/$third-party
||platform.twitter.com*/widgets/$third-party
||platform.twitter.com/anywhere.js$third-party
||platform.twitter.com/js/$third-party
||platform.twitter.com/widgets.js$third-party <<<<<<<

The version on ABP server doesn't:

||platform.twitter.com*/widget/$third-party
||platform.twitter.com*/widgets/$third-party
||platform.twitter.com/anywhere.js$third-party
||platform.twitter.com/embed/$~stylesheet,third-party
||platform.twitter.com/js/$third-party

Why??

@gorhill gorhill reopened this
@gorhill gorhill closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.