Adding a support for Telegram link for "OpenInApp" plugin (#1152)
* Adding a support for Telegram link for "OpenInApp" plugin * Update src/plugins/openInApp/index.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
546da118de
commit
98111c7aa5
2 changed files with 7 additions and 1 deletions
|
|
@ -43,6 +43,7 @@ export const ALLOWED_PROTOCOLS = [
|
|||
"tidal:",
|
||||
"itunes:",
|
||||
"vrcx:",
|
||||
"tg:",
|
||||
];
|
||||
|
||||
export const IS_VANILLA = /* @__PURE__ */ process.argv.includes("--vanilla");
|
||||
|
|
@ -71,4 +72,4 @@ if (IS_DEV) {
|
|||
}
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -65,6 +65,11 @@ const UrlReplacementRules: Record<string, URLReplacementRule> = {
|
|||
match: /^https:\/\/vrchat.com\/home\/(user|avatar|world|group)\/(.+)$/,
|
||||
replace: (_, type, id) => `vrcx://${type}/${id}`,
|
||||
description: "Open VRChat links in the VRCX app"
|
||||
},
|
||||
telegram: {
|
||||
match: /^https:\/\/t\.me\/([a-zA-Z0-9_]+)$/,
|
||||
replace: (_, username) => `tg://resolve?domain=${username}`,
|
||||
description: "Open Telegram links in the Telegram app"
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue