From cf7c4d63b6a8f11a4b8d96d39e4b5ca0c0cf4bc3 Mon Sep 17 00:00:00 2001 From: AutumnVN Date: Wed, 13 Sep 2023 04:11:53 +0700 Subject: pictureInPicture: don't show PiP button on normal file (#1725) --- src/plugins/pictureInPicture.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/pictureInPicture.tsx b/src/plugins/pictureInPicture.tsx index 7a9e790..d10d42f 100644 --- a/src/plugins/pictureInPicture.tsx +++ b/src/plugins/pictureInPicture.tsx @@ -29,8 +29,8 @@ export default definePlugin({ { find: ".onRemoveAttachment,", replacement: { - match: /\.nonMediaAttachment.{0,10}children:\[(\i),/, - replace: "$&$1&&$self.renderPiPButton()," + match: /\.nonMediaAttachment,!(\i).{0,7}children:\[(\i),/, + replace: "$&$1&&$2&&$self.renderPiPButton()," }, }, ], -- cgit