mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Redirect to vscode.dev/redirect and then vscode://.... (#254841)
So that the browser remembers who triggered the redirect. Fixes https://github.com/microsoft/vscode/issues/254810
This commit is contained in:
committed by
GitHub
parent
0f51f4269f
commit
8bd52a173e
@@ -47,15 +47,17 @@
|
||||
document.querySelector('.error-message > .detail').textContent = error;
|
||||
document.querySelector('body').classList.add('error');
|
||||
} else if (redirectUri) {
|
||||
// Wrap the redirect URI so that the browser remembers who triggered the redirect
|
||||
const wrappedRedirectUri = `https://vscode.dev/redirect?url=${encodeURIComponent(redirectUri)}`;
|
||||
// Set up the fallback link
|
||||
const fallbackLink = document.getElementById('fallback-link');
|
||||
if (fallbackLink) {
|
||||
fallbackLink.href = redirectUri;
|
||||
fallbackLink.href = wrappedRedirectUri;
|
||||
}
|
||||
|
||||
// Redirect after a delay
|
||||
setTimeout(() => {
|
||||
window.location = redirectUri;
|
||||
window.location = wrappedRedirectUri;
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user