uBlockOrigin / uBlock-issues

This is the community-maintained issue tracker for uBlock Origin
https://github.com/gorhill/uBlock
934 stars 79 forks source link

Abort-on-property-read cannot be used on different children on same object #1199

Open liamengland1 opened 4 years ago

liamengland1 commented 4 years ago

Prerequisites

Description

Abort-on-property-read cannot be used on different children on same object

A specific URL where the issue occurs

https://www.foreignaffairs.com/articles/united-states/2020-08-06/pandemic-hasnt-killed-populism/

Steps to Reproduce

  1. Add
    foreignaffairs.com##+js(aopr, Drupal.AjaxCommands)
    foreignaffairs.com##+js(aopr, Drupal.behaviors.newsletter_offer_overlay)

    to my filters

  2. Visit https://www.foreignaffairs.com/articles/united-states/2020-08-06/pandemic-hasnt-killed-populism on default settings

Expected behavior:

Not see the newsletter modal

Actual behavior:

The newsletter modal appeared

Your environment

This is basically https://github.com/uBlockOrigin/uBlock-issues/issues/156 and https://github.com/uBlockOrigin/uBlock-issues/issues/1162#issuecomment-660569797 but for abort-on-property-read

gorhill commented 4 years ago

What is the purpose of foreignaffairs.com##+js(aopr, Drupal.AjaxCommands)?

liamengland1 commented 4 years ago

I was writing rules to bypass the paywall on that website (I maintain a list for this).

foreignaffairs.com##+js(aopr, Drupal.AjaxCommands)
foreignaffairs.com##.paywall
foreignaffairs.com##.loading-indicator
foreignaffairs.com##.article-dropcap:not(.loaded):style(height:inherit!important;overflow:visibile!important)

foreignaffairs.com##+js(aopr, Drupal.AjaxCommands) stops the websites from deleting paragraphs of the article when it detects you are not a subscriber.

I was going to add foreignaffairs.com##+js(aopr, Drupal.behaviors.newsletter_offer_overlay) to address the newsletter overlay, however it did not work (this bug). I wanted to use the aopr rule because it is shorter than the cosmetic version (two rules - hide the modal and restyle the body to overflow:visible).