fix PictureInPicture (#2773)

Co-authored-by: v <vendicated@riseup.net>
main
Lumap 3 months ago committed by GitHub
parent 4e3c178043
commit 003e4a08d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -24,13 +24,13 @@ const settings = definePluginSettings({
export default definePlugin({ export default definePlugin({
name: "PictureInPicture", name: "PictureInPicture",
description: "Adds picture in picture to videos (next to the Download button)", description: "Adds picture in picture to videos (next to the Download button)",
authors: [Devs.Nobody], authors: [Devs.Lumap],
settings, settings,
patches: [ patches: [
{ {
find: ".nonMediaMosaicItem]", find: ".removeMosaicItemHoverButton),",
replacement: { replacement: {
match: /\.nonMediaMosaicItem\]:!(\i).{0,50}?children:\[(\S)/, match: /\.nonMediaMosaicItem\]:!(\i).{0,50}?children:\[\S,(\S)/,
replace: "$&,$1&&$2&&$self.renderPiPButton()," replace: "$&,$1&&$2&&$self.renderPiPButton(),"
}, },
}, },

@ -33,10 +33,6 @@ export interface Dev {
* If you are fine with attribution but don't want the badge, add badge: false * If you are fine with attribution but don't want the badge, add badge: false
*/ */
export const Devs = /* #__PURE__*/ Object.freeze({ export const Devs = /* #__PURE__*/ Object.freeze({
Nobody: {
name: "Nobody",
id: 0n,
},
Ven: { Ven: {
name: "Vee", name: "Vee",
id: 343383572805058560n id: 343383572805058560n
@ -545,7 +541,11 @@ export const Devs = /* #__PURE__*/ Object.freeze({
surgedevs: { surgedevs: {
name: "Chloe", name: "Chloe",
id: 1084592643784331324n id: 1084592643784331324n
} },
Lumap: {
name: "Lumap",
id: 585278686291427338n,
},
} satisfies Record<string, Dev>); } satisfies Record<string, Dev>);
// iife so #__PURE__ works correctly // iife so #__PURE__ works correctly

Loading…
Cancel
Save