FrostCo / AdvancedProfanityFilter

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

Video Site Request: Kanopy #498

Closed richardfrost closed 1 year ago

richardfrost commented 1 year ago

:movie_camera: The Site

https://www.kanopy.com/

:speech_balloon: Subtitle Element/Node

Example:

<!-- parent -->
<div class="vjs-text-track-display" translate="yes" aria-live="off" aria-atomic="true">
  <!-- node -->
  <div style="position: absolute; inset: 0px; margin: 1.5%;">
    <div style="direction: ltr; writing-mode: horizontal-tb; unicode-bidi: plaintext; text-align: center; font: 42.97px sans-serif; white-space: pre-line; position: absolute; width: 1860.47px; inset: 810.469px 0px 0px; height: 49px; background-color: rgba(0, 0, 0, 0);" class="vjs-text-track-cue vjs-text-track-cue-en" lang="en">
      <div style="color: rgb(255, 255, 255); background-color: rgb(0, 0, 0); position: relative; inset: 0px; display: inline; writing-mode: horizontal-tb; unicode-bidi: plaintext; font-family: sans-serif;">
        It's good to be home, Pop.
      </div>
    </div>
  </div>
</div>
richardfrost commented 1 year ago

Proposed config:

{
  "www.kanopy.com": [
    {
      "className": "vjs-text-track-display",
      "mode": "elementChild",
      "parentSelector": "div.vjs-text-track-display",
      "subtitleSelector": "div.vjs-text-track-cue > div",
      "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.