dhowe / AdLiPo

Replacing ads with generative language
https://rednoise.org/adlipo
2 stars 4 forks source link

Bad layout on washpost #20

Closed dhowe closed 3 years ago

dhowe commented 3 years ago

site: http://washingtonpost.com/

happens multiple time

image
Real-John-Cheung commented 3 years ago

Washington Post puts their ads at fixed locations and then have a script to overwrite the final node (i.e. our generated text) of the sub tree of the element (i.e our replacement) at that position.

Since the DOM element cannot be locked, we might try:

  1. have a list of websites that do similar things, and try to disable that specific script tab
  2. revert any changes that has been made to our replacement with mutation observer (I am experimenting with this)
Real-John-Cheung commented 3 years ago

I've added a content script that reverts the DOM changes for our replacements in 1ae7501135a8721

I tested on Firefox and Chrome and noted that the loading process was a bit slower, so I put it in a separate file that is only injected for websites that known to have similar behaviors (maybe we can keep a list of all this kind of websites?)

dhowe commented 3 years ago

This makes sense -- please add the list of domains for which this content-script should be injected...

Real-John-Cheung commented 3 years ago

I found two sites for now the list:

dhowe commented 3 years ago

great -- does this have any ramifications for adnauseam ?

Real-John-Cheung commented 3 years ago

does this have any ramifications for adnauseam ?

hmm I don't think so since adnauseam doesn't need to render anything in the original spots of the ads. The element being inserted by the websites is a little tag writes "ad", this process would not stop adnauseam from collecting and clicking the ads

dhowe commented 3 years ago

once you've add the list to the code, you can close this...

Real-John-Cheung commented 3 years ago

the list is added in the manifest.json files will update the list here and also the list in the files if new sites found