Skip to content

Commit

Permalink
Merge branch 'Vendicated:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinRMC authored Dec 13, 2024
2 parents 860f4a6 + 40a8cf1 commit 242898c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/plugins/appleMusic.desktop/native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

import { canonicalizeMatch } from "@utils/patches";
import { execFile } from "child_process";
import { promisify } from "util";

Expand All @@ -26,7 +27,7 @@ interface RemoteData {
let cachedRemoteData: { id: string, data: RemoteData; } | { id: string, failures: number; } | null = null;

const APPLE_MUSIC_BUNDLE_REGEX = /<script type="module" crossorigin src="([a-zA-Z0-9.\-/]+)"><\/script>/;
const APPLE_MUSIC_TOKEN_REGEX = /\w+="([A-Za-z0-9-_]*\.[A-Za-z0-9-_]*\.[A-Za-z0-9-_]*)",\w+="x-apple-jingle-correlation-key"/;
const APPLE_MUSIC_TOKEN_REGEX = canonicalizeMatch(/Promise.allSettled\(\i\)\}const \i="([A-Za-z0-9-_]*\.[A-Za-z0-9-_]*\.[A-Za-z0-9-_]*)"/);

let cachedToken: string | undefined = undefined;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/favEmojiFirst/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default definePlugin({
{
// https://regex101.com/r/x2mobQ/1
// searchEmojis(...,maxCount: stuff) ... endEmojis = emojis.slice(0, maxCount - gifResults.length)
match: /,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(Math\.max\(\i,\i(?:-\i\.length){2})\)/,
match: /,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(Math\.max\(\i,\i(?:-\i\.length){2}\))\)/,
// ,maxCount:Infinity ... endEmojis = (emojis.sliceTo = n, emojis)
replace: ",maxCount:Infinity$2=($3.sliceTo = $4, $3)"
}
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/pinDms/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default definePlugin({
replacement: [
{
// Filter out pinned channels from the private channel list
match: /(?<=\i,{channels:\i,)privateChannelIds:(\i)/,
match: /(?<=channels:\i,)privateChannelIds:(\i)(?=,listRef:)/,
replace: "privateChannelIds:$1.filter(c=>!$self.isPinned(c))"
},
{
Expand All @@ -96,8 +96,8 @@ export default definePlugin({

// Fix Row Height
{
match: /(?<="getRowHeight",.{1,100}return 1===)\i/,
replace: "($&-$self.categoryLen())"
match: /(\.startsWith\("section-divider"\).+?return 1===)(\i)/,
replace: "$1($2-$self.categoryLen())"
},
{
match: /"getRowHeight",\((\i),(\i)\)=>{/,
Expand Down

0 comments on commit 242898c

Please sign in to comment.