0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-25 12:45:17 +00:00

fix issues with external URL handling

This commit is contained in:
barath 2022-06-19 12:43:49 +05:30
parent b70150dc96
commit 6c506ba8d4
2 changed files with 2 additions and 2 deletions

View file

@ -137,7 +137,7 @@ export default {
CapacitorApp.addListener("appUrlOpen", (event) => {
this.$logger("ExternalURL", event.url);
// We only push to the route if there is a url present
linkParser(event.url);
const result = linkParser(event.url);
if (result) this.$router.push(result.pathname + result.search);
});

View file

@ -63,7 +63,7 @@ function linkParser(url) {
if (url) {
try {
const slug = new URL(setHttp(url));
const host = slug.hostname.toLowerCase().replace(/^www\./, "");
const host = slug.hostname.toLowerCase().replace(/^(www|m)\./, "");
if (host == "youtube.com") {
result = slug;
} else if (host == "youtu.be") {