FrostCo / AdvancedProfanityFilter

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

Shudder #455

Closed richardfrost closed 1 year ago

richardfrost commented 1 year ago

:movie_camera: The Site

www.shudder.com

:speech_balloon: Subtitle Element/Node

Example:

<!-- Movies -->
<div style="position: absolute; inset: 0px; margin: 1.5%;">
  <!-- node -->
  <div style="text-align: center; font: 59.17px sans-serif; white-space: pre-line; position: absolute; direction: ltr; writing-mode: horizontal-tb; inset: 1045.47px 734.906px 0px 734.875px; width: 390.688px; height: 138px; background-color: rgba(0, 0, 0, 0);" class="vjs-text-track-cue vjs-text-track-cue-0">
    <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;">(Heavy panting)</div>
  </div>
  <!-- end node -->
</div>
<!-- end Movies -->

<!-- TV -->
<div class="vjs-text-track-display" aria-live="off" aria-atomic="true">
  <!-- node -->
  <div style="position: absolute; inset: 0px; margin: 1.5%;">
    <div style="text-align: start; font: 30.29px sans-serif; white-space: pre-line; position: absolute; direction: ltr; writing-mode: horizontal-tb; inset: 571.844px -429.047px -34px 429.047px; width: 1129.09px; height: 68px; background-color: rgba(0, 0, 0, 0);" class="vjs-text-track-cue vjs-text-track-cue-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;">
        if you don't believe
        in God or Satan?
      </div>
    </div>
  </div>
  <!-- end node -->
</div>
<!-- end TV -->

:pencil: Additional notes

Requested by @WolfD1g1tal

richardfrost commented 1 year ago

This seems to work for both movies and shows:

{
  "www.shudder.com": [
    {
      "mode": "element",
      "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.

For best results, make sure to remove any custom config used for testing like this once its been included in the official update.

I'll get this added in the next release.

richardfrost commented 1 year ago

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