mirror of
https://github.com/Mibew/simple-icons.git
synced 2025-01-29 21:40:35 +03:00
Fix redirection when returning from new website (#5527)
This commit is contained in:
parent
2fb218a989
commit
07e57ebaff
@ -200,6 +200,7 @@
|
|||||||
$hideAlways = document.getElementById('hide-feedback-request');
|
$hideAlways = document.getElementById('hide-feedback-request');
|
||||||
|
|
||||||
var redesignUrl = 'https://simple-icons.github.io/simple-icons-website/',
|
var redesignUrl = 'https://simple-icons.github.io/simple-icons-website/',
|
||||||
|
redesignRootDomain = 'simple-icons.github.io',
|
||||||
hideBannerAlwaysIdentifier = 'hide-banner',
|
hideBannerAlwaysIdentifier = 'hide-banner',
|
||||||
redirectAutomaticallyIdentifier = 'redirect-to-redesign';
|
redirectAutomaticallyIdentifier = 'redirect-to-redesign';
|
||||||
|
|
||||||
@ -235,7 +236,7 @@
|
|||||||
var redirect = localStorage.getItem(redirectAutomaticallyIdentifier);
|
var redirect = localStorage.getItem(redirectAutomaticallyIdentifier);
|
||||||
if (redirect === 'true') {
|
if (redirect === 'true') {
|
||||||
$redirectAutomatically.innerHTML = "Disable redirect";
|
$redirectAutomatically.innerHTML = "Disable redirect";
|
||||||
if (document.referrer !== redesignUrl) {
|
if (document.referrer.split('/')[2] !== redesignRootDomain) {
|
||||||
window.location.replace(redesignUrl);
|
window.location.replace(redesignUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user