chore: cleanup deps

This commit is contained in:
DarkSky
2022-08-17 02:24:34 +08:00
parent 62d23ce1dd
commit 3964ac7a38
5 changed files with 32 additions and 545 deletions
@@ -1,5 +1,5 @@
const _regex =
/^(https?:\/\/(localhost:4200|(nightly|app)\.affine\.pro|.*?\.ligo-virgo\.pages\.dev)\/\w{28}\/)?(affine\w{16})(\/edgeless)?$/;
/^(https?:\/\/(localhost:4200|(nightly|app|livedemo)\.affine\.pro|.*?\.ligo-virgo\.pages\.dev)\/(\w{28}|AFFiNE)\/)?(affine[\w\-_]{16})(\/edgeless)?$/;
export const isAffineUrl = (url?: string) => {
if (!url) return false;
@@ -7,5 +7,5 @@ export const isAffineUrl = (url?: string) => {
};
export const toAffineEmbedUrl = (url: string) => {
return _regex.exec(url)?.[4];
return _regex.exec(url)?.[5];
};