diff --git a/src/plugins/pictureInPicture/index.tsx b/src/plugins/pictureInPicture/index.tsx index 20cedf45..ef3d35ff 100644 --- a/src/plugins/pictureInPicture/index.tsx +++ b/src/plugins/pictureInPicture/index.tsx @@ -30,10 +30,10 @@ export default definePlugin({ { find: ".removeMosaicItemHoverButton),", replacement: { - match: /\.nonMediaMosaicItem\]:!(\i).{0,50}?children:\[\S,(\S)/, - replace: "$&,$1&&$2&&$self.renderPiPButton()," - }, - }, + match: /\.nonMediaMosaicItem\]:.{0,40}children:\[(?<=showDownload:(\i).+?isVisualMediaType:(\i).+?)/, + replace: "$&$1&&$2&&$self.renderPiPButton()," + } + } ], renderPiPButton: ErrorBoundary.wrap(() => {