See Twemoji under Fanboy's Annoyances

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

See Twemoji under Fanboy's Annoyances

Post by lewisje »

I've found that the Twemoji images were being blocked by Fanboy's Annoyances (on sites like Emojipedia, or while using the Twemoji extension for Google Chrome); to reduce false positives without also making hundreds of ordinary whitelist rules for very similar URL patterns, I'm thinking the best approach is a regex:

Code: Select all

@@/1?[a-f0-9]{4}-twitter\.png/$image
All of the Twemoji images have filenames containing patterns of the form <codepoint>-twitter.png (often prepended by filesize indicators and appended by PageSpeed caching indicators), and the codepoint is either a 4-digit hex number, or a 5-digit hex number beginning with 1. Maybe this regex could be further refined, but even the deregifier won't unroll this into a huge set of simple filters.

Now it could be possible for someone to use the Twemoji API to generate a Twemoji whitelist containing simple filters for each Twemoji image, and my guess is that these few hundred filters (one per emoji in the Unicode standard, even fewer because Twemoji doesn't support all of them) would be faster than that one regex (which is much cruder and corresponds to 2^17 simple filters).
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
MonztA
ABP Developer
Posts: 3957
Joined: Mon Aug 14, 2006 12:18 am
Location: Germany

Re: See Twemoji under Fanboy's Annoyances

Post by MonztA »

How about removing the responsible filter instead?
Locked