mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 22:36:05 +02:00
Handle short URLs 1
This commit is contained in:
@@ -369,7 +369,7 @@ namespace VRCX
|
|||||||
if ((int)response.StatusCode == 301 || (int)response.StatusCode == 302)
|
if ((int)response.StatusCode == 301 || (int)response.StatusCode == 302)
|
||||||
{
|
{
|
||||||
url = response.Headers["Location"];
|
url = response.Headers["Location"];
|
||||||
if (url.Substring(0, 1) == "/")
|
if (url.Substring(0, 1) == "/" || url.Substring(0, 31) == "https://vrchat.com/home/launch?")
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -10190,6 +10190,10 @@ speechSynthesis.getVoices();
|
|||||||
if (testUrl === 'https://vrch.at') {
|
if (testUrl === 'https://vrch.at') {
|
||||||
AppApi.FollowUrl(input).then((url) => {
|
AppApi.FollowUrl(input).then((url) => {
|
||||||
// /home/launch?worldId=wrld_f20326da-f1ac-45fc-a062-609723b097b1&instanceId=33570~region(jp)&shortName=cough-stockinglinz-ddd26
|
// /home/launch?worldId=wrld_f20326da-f1ac-45fc-a062-609723b097b1&instanceId=33570~region(jp)&shortName=cough-stockinglinz-ddd26
|
||||||
|
// https://vrch.at/wrld_f20326da-f1ac-45fc-a062-609723b097b1
|
||||||
|
if (url.substring(0, 18) === 'https://vrchat.com') {
|
||||||
|
url = url.substring(18);
|
||||||
|
}
|
||||||
if (url.substring(0, 13) === '/home/launch?') {
|
if (url.substring(0, 13) === '/home/launch?') {
|
||||||
var urlParams = new URLSearchParams(url.substring(13));
|
var urlParams = new URLSearchParams(url.substring(13));
|
||||||
var worldId = urlParams.get('worldId');
|
var worldId = urlParams.get('worldId');
|
||||||
|
|||||||
Reference in New Issue
Block a user