ubyssey/ubyssey.ca

Make sure Ads don't go after very short p element

Closed this issue · 1 comments

inject_ads in ubyssey_ad_filters.py ads inserts an ad after every 6 p elements and doesn't discriminate between elements with a lot of innerHTML and those that just have a few words. Sometimes articles have lists that don't use a p element instead of li. that means ads end up breaking up those lists after every items which is pretty bad. We should either only insert after p elements with "enough" innerHTML.

Fixed by only including paragraphs with 75 or more characters