Update regex for Wavlake embeds, ignore zine subdomain (#529)
This commit is contained in:
parent
cc1d42c517
commit
be1cd923cd
@ -177,4 +177,5 @@ export const MagnetRegex = /(magnet:[\S]+)/i;
|
|||||||
/**
|
/**
|
||||||
* Wavlake embed regex
|
* Wavlake embed regex
|
||||||
*/
|
*/
|
||||||
export const WavlakeRegex = /(?:player\.)?wavlake\.com\/(track\/[.a-zA-Z0-9-]+|album\/[.a-zA-Z0-9-]+|[.a-zA-Z0-9-]+)/i;
|
export const WavlakeRegex =
|
||||||
|
/(?!zine\.wavlake\.com)(?:player\.|www\.)?wavlake\.com\/(?:(?:track|album)\/[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}|[a-z-]+)$/i;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const WavlakeEmbed = ({ link }: { link: string }) => {
|
const WavlakeEmbed = ({ link }: { link: string }) => {
|
||||||
const convertedUrl = link.replace(/(?:player\.)?wavlake\.com/, "embed.wavlake.com");
|
const convertedUrl = link.replace(/(?:player\.|www\.)?wavlake\.com/, "embed.wavlake.com");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<iframe
|
<iframe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user