mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 00:55:48 +01:00
chore(frontend): support Spotify for brainDiver (#11407)
* chore(frontend): support Spotify for brainDiver * no lowercase * album * syntax fix * Update packages/frontend/src/components/MkPostForm.vue Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * reformat --------- Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
This commit is contained in:
parent
bbd618a258
commit
339086995f
1 changed files with 17 additions and 10 deletions
|
@ -751,18 +751,25 @@ async function post(ev?: MouseEvent) {
|
||||||
claimAchievement('notes1');
|
claimAchievement('notes1');
|
||||||
}
|
}
|
||||||
|
|
||||||
const text = postData.text?.toLowerCase() ?? '';
|
const text = postData.text ?? '';
|
||||||
if ((text.includes('love') || text.includes('❤')) && text.includes('misskey')) {
|
const lowerCase = text.toLowerCase();
|
||||||
|
if ((lowerCase.includes('love') || lowerCase.includes('❤')) && lowerCase.includes('misskey')) {
|
||||||
claimAchievement('iLoveMisskey');
|
claimAchievement('iLoveMisskey');
|
||||||
}
|
}
|
||||||
if (
|
if ([
|
||||||
text.includes('https://youtu.be/Efrlqw8ytg4'.toLowerCase()) ||
|
'https://youtu.be/Efrlqw8ytg4',
|
||||||
text.includes('https://www.youtube.com/watch?v=Efrlqw8ytg4'.toLowerCase()) ||
|
'https://www.youtube.com/watch?v=Efrlqw8ytg4',
|
||||||
text.includes('https://m.youtube.com/watch?v=Efrlqw8ytg4'.toLowerCase()) ||
|
'https://m.youtube.com/watch?v=Efrlqw8ytg4',
|
||||||
text.includes('https://youtu.be/XVCwzwxdHuA'.toLowerCase()) ||
|
|
||||||
text.includes('https://www.youtube.com/watch?v=XVCwzwxdHuA'.toLowerCase()) ||
|
'https://youtu.be/XVCwzwxdHuA',
|
||||||
text.includes('https://m.youtube.com/watch?v=XVCwzwxdHuA'.toLowerCase())
|
'https://www.youtube.com/watch?v=XVCwzwxdHuA',
|
||||||
) {
|
'https://m.youtube.com/watch?v=XVCwzwxdHuA',
|
||||||
|
|
||||||
|
'https://open.spotify.com/track/3Cuj0mZrlLoXx9nydNi7RB',
|
||||||
|
'https://open.spotify.com/track/7anfcaNPQWlWCwyCHmZqNy',
|
||||||
|
'https://open.spotify.com/track/5Odr16TvEN4my22K9nbH7l',
|
||||||
|
'https://open.spotify.com/album/5bOlxyl4igOrp2DwVQxBco',
|
||||||
|
].some(url => text.includes(url))) {
|
||||||
claimAchievement('brainDiver');
|
claimAchievement('brainDiver');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue