[Blacklist] Fix a bug that caused videos not to get paused when blacklisted (#858)

This commit is contained in:
Cinder 2025-01-26 07:37:42 -08:00 committed by GitHub
parent 72d0878a0b
commit c21add0f9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
import Filter from "./models/Filter";
import PostCache from "./models/PostCache";
import Utility from "./utility";
import Page from "./utility/page";
import LStorage from "./utility/storage";
let Blacklist = {};
@ -235,7 +236,7 @@ $(() => {
// Pause videos when blacklisting
// This seems extraordinarily uncommon, so it's here
// just for feature parity with the old blacklist.
if ($("#c-posts #a-show").length > 0) return;
if (!Page.matches("posts", "show")) return;
let container = $("#image-container[data-file-ext='webm']").on("blk:hide", () => {
const video = container.find("video");
if (!video.length) return;