[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 edshot99
parent 13bdc2dfe0
commit 48396ea171

View File

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