From 09b646b86031312692a988c489bc6bad810906e3 Mon Sep 17 00:00:00 2001 From: Hugo C Date: Wed, 25 Oct 2023 14:41:09 +0200 Subject: [PATCH] fix: PictureInPicture (#1839) Co-authored-by: V --- src/plugins/pictureInPicture/index.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/plugins/pictureInPicture/index.tsx b/src/plugins/pictureInPicture/index.tsx index bb6aee18..f5f0a512 100644 --- a/src/plugins/pictureInPicture/index.tsx +++ b/src/plugins/pictureInPicture/index.tsx @@ -4,8 +4,6 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -import "./styles.css"; - import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; @@ -26,13 +24,12 @@ export default definePlugin({ description: "Adds picture in picture to videos (next to the Download button)", authors: [Devs.Lumap], settings, - patches: [ { - find: ".onRemoveAttachment,", + find: ".nonMediaAttachment]", replacement: { - match: /\.nonMediaAttachment,!(\i).{0,7}children:\[(\i),/, - replace: "$&$1&&$2&&$self.renderPiPButton()," + match: /\.nonMediaAttachment\].{0,10}children:\[\S{3}/, + replace: "$&&&$self.renderPiPButton()," }, }, ], @@ -43,7 +40,6 @@ export default definePlugin({ {tooltipProps => (