From 507f05dad690b2711c23242aa2e7ffb135079bbf Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 23 May 2024 09:40:19 -0400 Subject: [PATCH] feat(usrbg): support new simplified profiles --- src/plugins/usrbg/index.tsx | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/plugins/usrbg/index.tsx b/src/plugins/usrbg/index.tsx index 52b3ea7d..1221cb9c 100644 --- a/src/plugins/usrbg/index.tsx +++ b/src/plugins/usrbg/index.tsx @@ -27,10 +27,10 @@ import style from "./index.css?managed"; const API_URL = "https://usrbg.is-hardly.online/users"; interface UsrbgApiReturn { - endpoint: string - bucket: string - prefix: string - users: Record + endpoint: string; + bucket: string; + prefix: string; + users: Record; } const settings = definePluginSettings({ @@ -73,6 +73,19 @@ export default definePlugin({ } ] }, + { + find: /overrideBannerSrc:\i,profileType:/, + replacement: [ + { + match: /(\i)\.premiumType/, + replace: "$self.premiumHook($1)||$&" + }, + { + match: /(?<=function \i\((\i)\)\{)(?=var.{30,50},overrideBannerSrc:)/, + replace: "$1.overrideBannerSrc=$self.useBannerHook($1);" + } + ] + }, { find: "\"data-selenium-video-tile\":", predicate: () => settings.store.voiceBackground,