Skip to content

Commit

Permalink
fix(preprocess): update menu hooks (spicetify#2057)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrie25 authored Dec 18, 2022
1 parent 8d98f64 commit f7cc178
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/preprocess/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f7cc178

Please sign in to comment.