Skip to content

addEventListener-defuser.js does not work #4085

Open

Description

@ghajini

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

rule34video.co##+js(aeld, click, open) does not work with website navigation

A specific URL where the issue occurs.

NSFW https://rule34video.co/

Steps to Reproduce

  1. add rule34video.co##+js(aeld, click, open) to my filters
  2. navigate to https://rule34video.co/ , observe that rule34video.co##+js(aeld, click, open) work
  3. now click any video or categories ,this time work
  4. then reload the page, observe that filter does not work.
  5. on subsequent reloads of the page ,filter does not work

Expected behavior

rule34video.co##+js(aeld, click, open) work during website reloads or navigation

Troubleshooting information

uBlock Origin: 1.73.0
Chromium: 151
filterset (summary):
 network: 197029
 cosmetic: 54704
 scriptlet: 37785
 html: 0
listset (total-discarded, last-updated):
 added:
  CHN-0: 26977-70, 18h.9m
 default:
  user-filters: 2-0, never
  ublock-filters: 52948-87, 54m Δ
  ublock-badware: 10170-17, 54m Δ
  ublock-privacy: 4123-4, 54m Δ
  ublock-unbreak: 2798-1, 54m Δ
  ublock-quick-fixes: 519-0, 54m Δ
  easylist: 86264-481, 54m Δ
  easyprivacy: 56349-743, 54m Δ
  urlhaus-1: 47395-11, 54m
  plowe-0: 3521-0, 18h.9m
filterset (user): [array of 2 redacted]
userSettings:
 advancedUserEnabled: true
hiddenSettings:
 filterAuthorMode: true
supportStats:
 allReadyAfter: 650 ms (selfie)
 maxAssetCacheWait: 216 ms
 cacheBackend: indexedDB

Notes

  • while this can be fixed with other filter rule34video.co##+js(nowoif) but i filed this issue anyway so that addEventListener-defuser.js can be improved upon
  • i similarly tried rule34video.co##+js(acs, EventTarget.prototype.addEventListener, open) ,it work on hard refresh(ctrl+shift+R). same is true for rule34video.co##+js(aeld, click, open)

Activity

  1. uBlock-user commented on Aug 17, 2026

    @uBlock-user
    Member

    another issue with aeld ? previous one - #3970, should be merged into one thread.

  2. ghajini commented on Aug 17, 2026

    @ghajini
    Author

    that issue remain staled

  3. ghajini commented on Sep 10, 2026

    @ghajini
    Author

    @gorhill can you check ?

  4. gorhill commented on Sep 12, 2026

    @gorhill
    Member

    When I put a breakpoint at the line where addEventListener traps are installed, I can see that often all the secondary resources on the page are all loaded from memory cache, and the DOM is already fully loaded, so it's essentially a race condition typical of MV2 framework. I can't reproduce such issue with uBO Lite.

  5. gorhill commented on Sep 28, 2026

    @gorhill
    Member

    I am revisiting how the scriptlets are injected in order to fully benefit from Firefox's ability to register content scripts dynamically, and in the process I see unexpected results when injecting the scriptlets at onResponseStarted time, this might contribute to sometimes the scriptlets failing to be injected early -- early assessment though, to be taken cautiously.

  6. ghajini commented on Nov 7, 2026

    @ghajini
    Author

    I tested on firefox with latest uBO 1.75.5rc4.case here is improved .
    Also checked with ubo lite on chrome,it works fine too.

    Then i checked on MS edge with uBO 1.75.5rc4, issue remains but since we have already moved to ubo lite on chromium platforms so this is not big problem?

  7. gorhill commented on Nov 7, 2026

    @gorhill
    Member

    Using the filter tests page, I found this can’t be really fixed in chromium-based browsers, soft refresh in quick succession will always be unreliable. If I wait some time before refreshing, it will be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions