FrostCo / AdvancedProfanityFilter

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

Hulu on Disney+ Isn't Supported #531

Open richardfrost opened 6 months ago

richardfrost commented 6 months ago

:bug: Description

Hulu on Disney+ Isn't Supported

:twisted_rightwards_arrows: Steps To Reproduce

  1. Go to a Hulu (beta) title on Disney+
  2. Start a video
  3. Caption text isn't filtered unless Deep mode is enabled, and even then it doesn't mute.
richardfrost commented 6 months ago

Adding support for Hulu isn't as straightforward as I had hoped. It will take some time to work around a couple issues to get it "just right". In the meantime, this custom config should get you most of the way there:

{
  "www.disneyplus.com": [
    {
      "displaySelector": "disney-web-player >>> div.dss-subtitle-renderer-wrapper div.dss-subtitle-renderer-cue-window",
      "mode": "watcher",
      "note": "Hulu",
      "subtitleSelector": "disney-web-player >>> div.dss-subtitle-renderer-wrapper span.dss-subtitle-renderer-line",
      "videoSelector": "disney-web-player >>> video"
    },
    {
      "className": "dss-subtitle-renderer-wrapper",
      "mode": "element",
      "subtitleSelector": "div.dss-subtitle-renderer-cue-window span.dss-subtitle-renderer-line",
      "tagName": "DIV"
    }
  ]
}

To use this config, paste it into the Custom Sites area (Options page > Audio tab) and click the blue "SAVE" button underneath it. Then, make sure to refresh the tab for the video site (if you have it open still) and it will load this new configuration.

Make sure you have the domain mode set to Normal (not Deep) for this to work.

Main Disney+ titles should continue to work like normal with this config, and Hulu titles should also mute, though there could be a very slight delay with muting/unmuting. In addition, hiding captions will likely be pretty choppy.