From f7cc17871a2068095b7512b67062c4607c6915f5 Mon Sep 17 00:00:00 2001 From: Nam Anh Date: Sun, 18 Dec 2022 23:35:35 +0700 Subject: [PATCH] fix(preprocess): update menu hooks (#2057) --- src/preprocess/preprocess.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/preprocess/preprocess.go b/src/preprocess/preprocess.go index ca0c7aa680..e8d89a1cb2 100644 --- a/src/preprocess/preprocess.go +++ b/src/preprocess/preprocess.go @@ -351,19 +351,19 @@ Spicetify.React.useEffect(() => { // React Component: Album Context Menu items utils.Replace( &input, - `(\w+)(=\w+[\(\)]*\.memo\(\((?:function\([\{\w\}:,]+\)|\()?\{(?:\w+ ?[\w\{\}\(\)=,:]*)?(?:[\w=\.]*(?:uri|sharingInfo|onRemoveCallback)[:\w]*,?)*[\w=\(\).,]*;?(?:return ?|=>)[\w$\.,()]+\([\w\.]+,\{value:"album")`, + `(\w+)(=\w+[()]*\.memo\(\((?:function\([{\w\d}:=!,]+\)|\()?\{(?:\w+ ?[\w{}()=,:]*)?(?:[\w=.]*(?:uri|sharingInfo|onRemoveCallback)[:\w]*,?)*[\w=().,]*;?(?:return ?|=>)[\w$.,()]+\([\w.]+,\{value:"album")`, `${1}=Spicetify.ReactComponent.AlbumMenu${2}`) // React Component: Show Context Menu items utils.Replace( &input, - `(\w+)(=\w+[\(\)]*\.memo\(\((?:function[()\{\w\}:,]+|\()?\{(?:\w+ ?[\w\{\}\(\)=,:.!]*)?(?:[\w=\.]*(?:uri|sharingInfo|onRemoveCallback)[:\w]*,?)*[\w=\(\).,]*;?(?:return ?|=>)[\w$\.,()]+\([\w\.]+,\{value:"show")`, + `(\w+)(=\w+[()]*\.memo\(\((?:function[(){\w}:,]+|\()?\{(?:\w+ ?[\w{}()=,:.!]*)?(?:[\w=.]*(?:uri|sharingInfo|onRemoveCallback)[:\w]*,?)*[\w=().,]*;?(?:return ?|=>)[\w$.,()]+\([\w.]+,\{value:"show")`, `${1}=Spicetify.ReactComponent.PodcastShowMenu${2}`) // React Component: Artist Context Menu items utils.Replace( &input, - `(\w+)(=\w+[\(\)]*\.memo\(\((?:function\([\{\w\}:,]+\)|\()?\{(?:\w+ ?[\w\{\}\(\)=,:]*)?(?:[\w=\.]*(?:uri|sharingInfo|onRemoveCallback)[:\w]*,?)*[\w=\(\).,]*;?(?:return ?|=>)[\w$\.,()]+\([\w\.]+,\{value:"artist")`, + `(\w+)(=\w+[()]*\.memo\(\((?:function\([{\w\d}=!:,]+\)|\()?\{(?:\w+ ?[\w{}()=,:]*)?(?:[\w=.]*(?:uri|sharingInfo|onRemoveCallback)[:\w]*,?)*[\w=().,]*;?(?:return ?|=>)[\w$.,()]+\([\w.]+,\{value:"artist")`, `${1}=Spicetify.ReactComponent.ArtistMenu${2}`) // React Component: Playlist Context Menu items