FrostCo / AdvancedProfanityFilter

A browser extension to filter profanity from webpages
GNU General Public License v3.0
159 stars 26 forks source link

HBOMax is now Max #505

Closed ShamanSquirrel closed 1 year ago

ShamanSquirrel commented 1 year ago

Instructions: This template is written in Markdown. Click the "Preview" tab to see what it will look like when submitted. Fill in the applicable sections (you can erase the examples if you'd like). For more information, please see this page.

:movie_camera: The Site

play.max.com

:speech_balloon: Subtitle Element/Node

Example:

<div class="subtitle-container">
  <p class="subtitle-text">Subtitle text</p>
</div>

:pencil: Additional notes

Add any other context or screenshots about the request here.

richardfrost commented 1 year ago

Thanks for reporting this @ShamanSquirrel! I see that they have changed their captions/subtitles quite a bit but should be able to get a new version supporting it this weekend.

sheldonhull commented 1 year ago

I started testing with this config. Maybe the selector bit would be useful.

{
  "play.max.com": [
    {
      "apfCaptions": true,
      "displaySelector": "div[class^=\"CaptionWindow\"]",
      "displaySelectorParents": 1,
      "ignoreMutations": true,
      "mode": "watcher",
      "subtitleSelector": "div[class^=\"CaptionWindow\"]"
    }
  ]
}

Edit: Ok this worked, but not sure it's the correct way as I just duplicated display and subtitle Watcher. I think i saw some visual artifacts. I'll follow for any updates. For now this seems to work good enough.

richardfrost commented 1 year ago

Awesome work @sheldonhull, congrats on getting it that far! I believe I have a new config that will be a little more performant and should deal with those display artifacts. I had to make a couple code changes as well, so I'll bundle the new config with the next version. I am on track to get it released later today. But, in the meantime, feel free to use the config you shared. When the new version comes out, make sure to remove your custom code though because it will override the config included updated config for Max.

richardfrost commented 1 year ago

This has been included in version 3.2.2. Feel free to comment here if you have any feedback for this update.

sheldonhull commented 1 year ago

really appreciate it!